Nested IF Statement
Can someone help me fix this formula:
=IF([Provider_Helper]@row = "Provider", JOIN(UPPER([FName_Helper]@row + " " + [Last Name]@row) + ", " + Credential@row), ([Provider_Helper]@row = "Resident", JOIN(UPPER([FName_Helper]@row + " " + [Last Name]@row) + ", " + Credential@row) + " (" + Role@row) + ")", (JOIN(UPPER([First Name]@row + " " + [LName_Helper]@row) + ", " + Credential@row))
I keep getting an "unparsable" error.
I'm trying to satisfy the following:
- If Provider_Helper = "Provider" then JOIN(UPPER([FName_Helper]@row + " " + [Last Name]@row) + ", " + Credential@row)
- If Provider_Helper = "Resident" then JOIN(UPPER([FName_Helper]@row + " " + [Last Name]@row) + ", " + Credential@row) + " (" + Role@row) + ")"
- If Provider_Helper is not "Provider" or "Resident" then (JOIN(UPPER([First Name]@row + " " + [LName_Helper]@row) + ", " + Credential@row)
Best Answer
-
My apologies. I missed the full name vs initial bit in the first formula. The formula I provided will output:
- If "Provider" = J. Doe, MD
- If "Resident" = J. Doe, MD (R1)
- If not "Provider" or "Resident" = J. Doe, RN
Now that I see you want to switch it up a little bit on that last piece, we want to use this instead:
=IF(OR([Provider_Helper]@row = "Provider", [Provider_Helper]@row = "Resident"), [FName_Helper]@row + " " + [Last Name]@row + ", " + Credential@row + IF([Provider_Helper]@row = "Resident", " (" + Role@row + ")"), [First Name]@row + " " + [LName_Helper]@row + ", " + Credential@row)
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
Answers
-
Try this:
=UPPER([FName_Helper]@row) + " " + UPPER([Last Name]@row) + ", " + UPPER(Credential@row) + IF([Provider_Helper]@row = "Resident", " (" + UPPER(Role@row) + ")")
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
-
@Paul Newcome, sorry man, I think I might have got lost in the abbreviated formula.
Can you send what the entire string should reflect?
The result should reflect the following:
- Argument 1 (if "Provider") = J. Doe, MD
- Argument 2 (if "Resident") = J. Doe, MD (R1)
- Argument 3 (if not "Provider" or "Resident") = John D., RN
-
My apologies. I missed the full name vs initial bit in the first formula. The formula I provided will output:
- If "Provider" = J. Doe, MD
- If "Resident" = J. Doe, MD (R1)
- If not "Provider" or "Resident" = J. Doe, RN
Now that I see you want to switch it up a little bit on that last piece, we want to use this instead:
=IF(OR([Provider_Helper]@row = "Provider", [Provider_Helper]@row = "Resident"), [FName_Helper]@row + " " + [Last Name]@row + ", " + Credential@row + IF([Provider_Helper]@row = "Resident", " (" + Role@row + ")"), [First Name]@row + " " + [LName_Helper]@row + ", " + Credential@row)
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
-
This works, thank you so much!
-
Happy to help. 👍️
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.8K Get Help
- 376 Global Discussions
- 207 Industry Talk
- 440 Announcements
- 4.5K Ideas & Feature Requests
- 139 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 284 Events
- 33 Webinars
- 7.3K Forum Archives