Forum Discussion
Ash7991
Dec 03, 2022Copper Contributor
IF statements
Hi Everyone, I am attempting to use IF statements for the first time, and very typically for me - I have not started off easy! I'm attempting to say if Cell (F7 for example) = X, then round up t...
- Dec 03, 2022
That could be like
=CEILING( F7, IF( F7 < 30, 2, IF( F7 < 100, 5, IF( F7 < 200, 10, 1) ) ) )
or
=CEILING( F7, LOOKUP(F7, {0,30,100,200}, {2,5,10,1} ) )
or
=CEILING( F7, IFS( F7 < 30, 2, F7 < 100, 5, F7 < 200, 10, TRUE, 1) )
Ash7991
Dec 03, 2022Copper Contributor
Thank you so much! I've tried the first one and it does exactly as asked - hopefully I can learn from that!
SergeiBaklan
Dec 04, 2022Diamond Contributor
Ash7991 , you are welcome