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
-
This will concatenate the results of multiple IF statements.
=IF(PPE@row <> "", "PPE") + IF(PPE@row <> "", " ","") + IF([Work Environment]@row <> "", "Work Environment", "")
-
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.
Answers
-
This will concatenate the results of multiple IF statements.
=IF(PPE@row <> "", "PPE") + IF(PPE@row <> "", " ","") + IF([Work Environment]@row <> "", "Work Environment", "")
-
That's definitely a lot closer! Is there a way to separate out the returned values with a space or comma or even a line break?
-
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.
-
Oh I missed that one in my changes. I added it and that's perfect! You've been amazing! 😊
-
I'm glad it worked for you!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 472 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!