Forum Discussion
if statement seems reversed
- Jan 13, 2024
kieranmac Long story short. G2 contains a text based on what I guess a formula like =LEFT(E2,2).
A text is always considered greater than a number. That's why you will always get 1.
You have two options.
1) change the formula in G2 to =LEFT(E2,2)*1 or =--LEFT(E2,2). Both these will turn the result into the number 10 and your IF formula will work.
2) change the IF formula to =IF(C4>"60",1,0), in case you really want to compare texts.
kieranmac Long story short. G2 contains a text based on what I guess a formula like =LEFT(E2,2).
A text is always considered greater than a number. That's why you will always get 1.
You have two options.
1) change the formula in G2 to =LEFT(E2,2)*1 or =--LEFT(E2,2). Both these will turn the result into the number 10 and your IF formula will work.
2) change the IF formula to =IF(C4>"60",1,0), in case you really want to compare texts.
Riny_van_Eekelen
Thank you so much! I thought I was going crazy. Multiplying by 1 was a quick fix.