Multiplication with results of an IF Statement

Nick Burrus
Nick Burrus ✭✭✭✭✭✭
edited 12/09/19 in Smartsheet Basics

Hello,

It appears you can't do calculations with the results of a nested IF statement?

 

=(IF([Shift Duration]1 = "2 Hours", "3.75", IF([Shift Duration]1 = "3 Hours", "2.5", "NA"))) * [Number]1

It appears I have to have the IF statement alone in one column, and then the math in another column. 

=IF([Shift Duration]1 = "2 Hours", "3.75", IF([Shift Duration]1 = "3 Hours", "2.5", "NA"))

=[Formula]1 * [Number]1

Is there a way to condense this down to one formula, or are we stuck with math in an if statement being two cells? 

Dr. St Nicholas Burrus DHA, PMP

I build Smartsheets for the US Government, State Government, and about a dozen of the US Fortune 100s.

Comments

  • Nick Burrus
    Nick Burrus ✭✭✭✭✭✭

    Hello. The FAQ docs aren't clear.

     

    The problem is I used "quotes" when you need a numerical value, drop the quotes. Smartsheet isn't smart enough to exclude it. It'd think it's a text based value. :) 

    =IF([Shift Duration]1 = "2 Hours", "3.75", IF([Shift Duration]1 = "3 Hours", "2.5", "NA"))

    should be

    =IF([Shift Duration]1 = "2 Hours", 3.75, IF([Shift Duration]1 = "3 Hours", 2.5, "NA"))

    Dr. St Nicholas Burrus DHA, PMP

    I build Smartsheets for the US Government, State Government, and about a dozen of the US Fortune 100s.

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭

    That is correct. Using quotes generates a text string.

    Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!

    CERTIFIED SMARTSHEET PLATINUM PARTNER

    10xViz.com