SOLVED

IF formula

Copper Contributor

Hi, I have entered this formula to returneither a "1", "2" or "3" depending on the value stated, yet it only returns "1"... wondering what I have done wrong please? =IF(G3>4999,1,0*(IF(G3>19999,2,0*(IF(G3>29999,3,0)))))

2 Replies
best response confirmed by ando67 (Copper Contributor)
Solution

@ando67  Based on your formula you should get either 1 or 0 because you multiply the false case by 0.  Try this instead:

=IF(G3>29999,3,IF(G3>19999,2,IF(G3>4999,1,0)))

or more readable version would be:

=IFS(G3>29999,3,G3>19999,2,G3>4999,1,TRUE,0)

Ah thanks!@mtarler That jogged the ol' memory - Cheers'n'Beers

 

1 best response

Accepted Solutions
best response confirmed by ando67 (Copper Contributor)
Solution

@ando67  Based on your formula you should get either 1 or 0 because you multiply the false case by 0.  Try this instead:

=IF(G3>29999,3,IF(G3>19999,2,IF(G3>4999,1,0)))

or more readable version would be:

=IFS(G3>29999,3,G3>19999,2,G3>4999,1,TRUE,0)

View solution in original post