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.

Simplifying my formula

I would like to simplify a formula (if possible). Several items in the formula below have the same value (e.g. 25 or 10). 

=IF([Activity_1]1 = “JTA”, “25”, IF([Activity_1]1 = “IDW”, “25”, IF([Activity_1]1 = “Lab Builds”, “25”, IF([Activity_1]1 = “TR”, “20”, IF([Activity_1]1 = “VCDX Def”, “15”, IF([Activity_1]1 = “VCDX RemDef”, “10”, IF([Activity_1]1 = “VCDX AppRev”, “10”, IF([Activity_1]1 = “VLZ Short”, “10”, IF([Activity_1]1 = “VMW Blogging”, “10”, IF([Activity_1]1 = “VLZ Series”, “20”, IF([Activity_1]1 = “SS”, “10”, IF([Activity_1]1 = “Lab Testing”, “10”, IF([Activity_1]1 = “Blog CLS”, “1”, “”)))))))))))))

I would like to combine text that have the same value in one IF statement. For example:

=IF([Activity_1]1 = “JTA | IDW | “Lab Build”, “25”, IF([Activity_1]1 = “VCDX RemDef | VCDX AppRev | VLZ Short | Blogging | SS | Lab Testing, “10”, ))

where the | (pipe) symbol acts as an OR (i.e. JTA or IDW or Lab Build”) and applies a value of 25. Likewise for the 10 values (i.e. VLZ short, SS and so on). 

Assuming that this is possible, can someone help me with the syntax?

Also, the complete formula (above) doesn't work for me (it worked for the person who created it though, so I'm not sure if it's a limitation on my Smartsheet or if it's me [probably the latter]). ;-)

Comments

  • Hi,

    You can use an OR function to combine these; for example:

    =IF(OR([Activity_1]1 = "IDW", [Activity_1]1 = "Lab Build"), 25, IF(OR(...))).

    Two things of note:

    1. It's best to not enclose numbers in quotes, otherwise you'll return a text value that looks like another instead of an actual number.
    2. End parens on IF statements go at the end of the formula, but end parens on the OR function goes directly after your last OR argument (see example above).

    More on OR can be found in the help center: https://help.smartsheet.com/function/or

This discussion has been closed.