Show only one value

I am trying to get the first instance of a string to show up. Here is the formula I am using.

=IF(Awareness@row< 4, "Awareness" + CHAR(10), "") + IF(Desire@row< 4, "Desire" + CHAR(10), "") + IF(Knowledge@row< 4, "Knowledge" + CHAR(10), "") + IF(Ability@row< 4, "Ability" + CHAR(10), "") + IF(Reinforcement@row< 4, "Reinforcement" + CHAR(10), "")


I want only the first time one of the values is less than 4 to show up. With this formula, all instances that are less than 4 are showing up. Can you help please?


Thanks!


Ruth


Best Answer

  • jmyzk_cloudsmart_jp
    jmyzk_cloudsmart_jp ✭✭✭✭✭✭
    edited 12/26/23 Answer ✓

    Hi @ruthcurran

    In your formula, subusitiute " + CHAR(10), "") + " with ",".

    =IF(Awareness@row < 4, "Awareness", IF(Desire@row < 4, "Desire", IF(Knowledge@row < 4, "Knowledge", IF(Ability@row < 4, "Ability", IF(Reinforcement@row < 4, "Reinforcement")))))

    or for readability purposes,

    =

    IF(Awareness@row < 4, "Awareness",

    IF(Desire@row < 4, "Desire",

    IF(Knowledge@row < 4, "Knowledge",

    IF(Ability@row < 4, "Ability",

    IF(Reinforcement@row < 4, "Reinforcement"

    )))))

    This formula checks from the "Awareness" to "Reinforcement" successively and returns the "Text" value such as "Awareness" as soon as the IF statement is true. (Your formula concatenates all the true cases with the "+".)


Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!