More fun with functions =IF(OR

So, I am trying to set up a formula that assigns a person based on a teaching discipline. I have had some success, however, only when it comes to 1-to-1 relationships. I would like to assign an individual name based on any of several possible teaching disciplines within their purview. So, what I have that currently works looks like this:
=IF([Teaching Discipline]@row = "English", "AA", IF([Teaching Discipline]@row = "Art", "BB", IF([Teaching Discipline]@row = "Philosophy", "CC", IF([Teaching Discipline]@row = "Business", "DD", IF([Teaching Discipline]@row = "Accounting", "EE", IF([Teaching Discipline]@row = "Government", "FF", IF([Teaching Discipline]@row = "History", "GG", IF([Teaching Discipline]@row = "Anthropology", "HH", IF([Teaching Discipline]@row = "Mathematics", "II", IF([Teaching Discipline]@row = "Biology", "JJ", IF([Teaching Discipline]@row = "Geology", "KK", IF([Teaching Discipline]@row = "Computer Science", "LL"))))))))))))
I'd like to expand the above formula so that "AA" might populate in the name column not based on just "English" in the Teaching Discipline, but also "Humanities." So that either of those disciplines might trigger "AA" to appear in the name column on the same row. Likewise, I'd like to add additional disciplines for other names like "BB," "CC," and so on.
I expect this would involve some OR functions being added, but I've yet to be able to put something together that doesn't trigger an UNPARSEABLE or some other error.
Thanks for any insight.
Best Answer
-
Hi @Draykov ,
I have added in the OR syntax for "Humanities" as in your example.
=IF(OR([Teaching Discipline]@row = "English", [Teaching Discipline]@row = "Humanities"), "AA", IF([Teaching Discipline]@row = "Art", "BB", IF([Teaching Discipline]@row = "Philosophy", "CC", IF([Teaching Discipline]@row = "Business", "DD", IF([Teaching Discipline]@row = "Accounting", "EE", IF([Teaching Discipline]@row = "Government", "FF", IF([Teaching Discipline]@row = "History", "GG", IF([Teaching Discipline]@row = "Anthropology", "HH", IF([Teaching Discipline]@row = "Mathematics", "II", IF([Teaching Discipline]@row = "Biology", "JJ", IF([Teaching Discipline]@row = "Geology", "KK", IF([Teaching Discipline]@row = "Computer Science", "LL"))))))))))))
If you follow the same structure, you can add to any of the other IF scenarios you need.
Hope this helps,
Dave
Answers
-
Hi @Draykov ,
I have added in the OR syntax for "Humanities" as in your example.
=IF(OR([Teaching Discipline]@row = "English", [Teaching Discipline]@row = "Humanities"), "AA", IF([Teaching Discipline]@row = "Art", "BB", IF([Teaching Discipline]@row = "Philosophy", "CC", IF([Teaching Discipline]@row = "Business", "DD", IF([Teaching Discipline]@row = "Accounting", "EE", IF([Teaching Discipline]@row = "Government", "FF", IF([Teaching Discipline]@row = "History", "GG", IF([Teaching Discipline]@row = "Anthropology", "HH", IF([Teaching Discipline]@row = "Mathematics", "II", IF([Teaching Discipline]@row = "Biology", "JJ", IF([Teaching Discipline]@row = "Geology", "KK", IF([Teaching Discipline]@row = "Computer Science", "LL"))))))))))))
If you follow the same structure, you can add to any of the other IF scenarios you need.
Hope this helps,
Dave
-
Thanks @DKazatsky2! That syntax did the trick and I was able to finish out my formula successfully! I appreciate the help!
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 66.1K Get Help
- 430 Global Discussions
- 149 Industry Talk
- 488 Announcements
- 5.2K Ideas & Feature Requests
- 85 Brandfolder
- 153 Just for fun
- 74 Community Job Board
- 499 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 305 Events
- 36 Webinars
- 7.3K Forum Archives