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
- Customer Resources
- 64.8K Get Help
- 434 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives