How to run multiple IF functions independently of each other in the same cell?


I'm having trouble figuring out how to get multiple "IF" statements to run simultaneously. I need it to check the presence of text in multiple columns, but the Value if True, shouldn't stop the formula from checking the other boxes, and it shouldn't only return a value if ALL conditions are met.

So, I need an IF statement to check if there is something in PPE, then give back PPE, and Check if something is in Work Environment, then give back "Work Environment" and so on. I have the baseline formula in the second box down in column "Type Count" Which is

=IF(PPE@row <> "", "PPE")

But in the first "Unparseable" box, I tried sort of stacking them

=IF(PPE@row <> "", "PPE",) =IF([Work Environment]@row <> "", "Work Enviornment")

which clearly isn't correct.

Is there a way to run multiple IF functions independently of each other? Or am I going about this wrong.


Best Answers

  • Carson Penticuff
    Carson Penticuff ✭✭✭✭✭✭
    edited 04/05/24 Answer ✓

    This will concatenate the results of multiple IF statements.

    =IF(PPE@row <> "", "PPE") + IF(PPE@row <> "", " ","") + IF([Work Environment]@row <> "", "Work Environment", "")

  • Carson Penticuff
    Carson Penticuff ✭✭✭✭✭✭
    Answer ✓

    Absolutely! The formula I posted above will insert a single space between the entries, that is what this section does:

    IF(PPE@row <> "", " ","")

    You can replace that space with pretty much any character(s) you want:

    IF(PPE@row <> "", "↑↓→╚","")

    That's probably not what you are looking for, but it would work. 😁

    If you want to add a line break, you can use the CHAR function instead:

    =IF(PPE@row <> "", "PPE") + IF(PPE@row <> "", CHAR(10),"") + IF([Work Environment]@row <> "", "Work Environment", "")

    ***A special note, however. For the line break to work, you will need to make sure to format the requisite column to allow word wrap.


Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!