# IF-THEN results wrong when Lookup Cells are empty

**URL:** <https://community.glideapps.com/t/if-then-results-wrong-when-lookup-cells-are-empty/13443>\
**Category:** Report a Bug\
**Created:** [August 2, 2020, 4:30am UTC](https://community.glideapps.com/t/if-then-results-wrong-when-lookup-cells-are-empty/13443 "2020-08-02T04:30:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fassil\_Befekadu](https://avatars.discourse-cdn.com/v4/letter/f/df705f/32.png) [@Fassil\_Befekadu](https://community.glideapps.com/u/Fassil_Befekadu)\
**Post date:** [August 2, 2020, 4:30am UTC](https://community.glideapps.com/t/if-then-results-wrong-when-lookup-cells-are-empty/13443/1 "2020-08-02T04:30:48Z")

</div>

When comparing two Lookup cell values that are empty, the IF-THEN logic should have resulted in a 0 - but instead shows 1. The screenshot should explain

 ![Screen Shot 2020-08-01 at 9.24.10 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/8/85698a67665a6fb8c9e2231a143ce859a56701cc.png) everything.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [August 2, 2020, 5:36am UTC](https://community.glideapps.com/t/if-then-results-wrong-when-lookup-cells-are-empty/13443/2 "2020-08-02T05:36:01Z")

</div>

What would happen when you try TS2 is equal to TS3 then 0?

---

<div class="post-metadata">

**Author:** ![Jason](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jason/32/14_2.png) [@Jason](https://community.glideapps.com/u/Jason)\
**Post date:** [August 2, 2020, 6:26am UTC](https://community.glideapps.com/t/if-then-results-wrong-when-lookup-cells-are-empty/13443/3 "2020-08-02T06:26:44Z")

</div>

Does this only happen with lookups or does it also happen with normal empty cells?

---

<div class="post-metadata">

**Author:** ![Fassil\_Befekadu](https://avatars.discourse-cdn.com/v4/letter/f/df705f/32.png) [@Fassil\_Befekadu](https://community.glideapps.com/u/Fassil_Befekadu)\
**Post date:** [August 2, 2020, 9:19pm UTC](https://community.glideapps.com/t/if-then-results-wrong-when-lookup-cells-are-empty/13443/4 "2020-08-02T21:19:37Z")

</div>

> [@ThinhDinh](#):
>
> try

Hi @ThinhDinh. There is no “equal” option. I used the “is” option. Surprising as both these values are Dates.  
When I do what you suggested it gave me the wrong answer of “1”. If it had thought they were equal it would have given me a “0”.

 ![Screen Shot 2020-08-02 at 2.16.36 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/1/189d70ddb05e2cbfcc2ffdd79ac769b7d23e8be2.png)

---

<div class="post-metadata">

**Author:** ![Fassil\_Befekadu](https://avatars.discourse-cdn.com/v4/letter/f/df705f/32.png) [@Fassil\_Befekadu](https://community.glideapps.com/u/Fassil_Befekadu)\
**Post date:** [August 2, 2020, 9:23pm UTC](https://community.glideapps.com/t/if-then-results-wrong-when-lookup-cells-are-empty/13443/5 "2020-08-02T21:23:54Z")

</div>

Hi @Jason. I have only seen the problem with Lookups where I was getting the value back of a cell that happened to be empty. At other times, when that same cell had a value, it seemed to work fine.
