Forum Discussion

Ash7991's avatar
Ash7991
Copper Contributor
Dec 03, 2022
Solved

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...
  • SergeiBaklan's avatar
    Dec 03, 2022

    Ash7991 

    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) )

Resources