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)
Answers
-
Try this:
=UPPER([FName_Helper]@row) + " " + UPPER([Last Name]@row) + ", " + UPPER(Credential@row) + IF([Provider_Helper]@row = "Resident", " (" + UPPER(Role@row) + ")")
-
@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)
-
This works, thank you so much!
-
Happy to help. 👍️
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64K Get Help
- 412 Global Discussions
- 220 Industry Talk
- 459 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 140 Just for fun
- 57 Community Job Board
- 460 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives