Welcome to the Smartsheet Forum Archives


The posts in this forum are no longer monitored for accuracy and their content may no longer be current. If there's a discussion here that interests you and you'd like to find (or create) a more current version, please Visit the Current Forums.

If Statements and Calculations

Jennifer Levey
Jennifer Levey โœญโœญโœญ
edited 12/09/19 in Archived 2017 Posts

I'm trying to calculate a cost based on whether a field is marked (and another field that contains quantity) or not. So, if field A is marked (checkbox), then multiply $5 x Field B. If field A is not marked, then multiply $4 x Field B.

ย 

Is there a formula for this? Thank you, Jennifer

Tags:

Comments

  • J. Craig Williams
    J. Craig Williams โœญโœญโœญโœญโœญโœญ
    edited 03/07/17

    Jennifer,

    ย 

    =IF( ย [field A]23 ย , 5 * [Field B]23 ย , 4 * [Field B]23 )ย 

    ย 

    for row 23

    ย 

    This also works:

    ย 

    =IF( ย [field A]23 ย , 5 , 4 ย ) * [Field B]23

    ย 

    I added spaces for clarity (I hope).

    ย 

    Craig

    ย 

  • Charles DESCOTES
    Charles DESCOTES โœญโœญ
    edited 03/08/17

    Beside,

    You may want to split Craig's formula to SHOW which figure is used:

    Create a new column withย =IF( ย [field A]23 ย , 5 , 4 ย )

    And in another column calculate your cost =([new column]23 *ย [Field B]23)

    ย 

    Also, considering that the figures 5 and 4 could change over time, they can be located in a place where you can track or change them.

    In such case you simply refer to the related box in the formula.

This discussion has been closed.