I need a long statement for my calculated column to work.

Basically I need it to say

=IF[DeptID=201000 - Instruction],"Bob") OR =IF[DeptID=201000 - Instruction],"Tod") OR =IF[DeptID=201000 - Instruction],"Sara")

  • 1
    This question is not entirely clear -- your "OR" conditions are all the same condition, with seemingly different outputs? Is this a Calculated column formula, or a column validation formula? – willman Jan 17 at 19:34

OR itself is a function, see here.

for example, =IF(OR([thing1]=[thing2],[thing3]=[thing4],[thing5]=[thing6]), "ValueToShowIfAtLeastOneOfThoseAreTrue", "ValueToShowIfNoneAreTrue")) Basically, the OR function takes as up to 30 different boolean statement parameters, and returns TRUE if any one or more of those statements evaluates to TRUE, and returns FALSE if none of the statements are TRUE. (there is a similar AND() function that only returns TRUE if all of the provided statements are TRUE.

You can also Nest IF statements, so the first parameter is your boolean parameter (which itself can be an OR or AND or some other boolean function), the second parameter is what to return when the first parameter is TRUE, and the third parameter is what to return when that first parameter is FALSE, and this third parameter can also be a nested IF to evaluate if the first one was FALSE, and so on.

Based on your comment, the following example of the OR function may be closer to what you are trying to do.

=IF(OR([DeptID]=101,[DeptID]=102,[DeptID]=103),"Bob", IF(OR([DeptID]=211,[DeptID]=212,[DeptID]=213), "TOD", IF(OR([DeptID]=641,[DeptID]=642,[DeptID]=643), "Sara", "Unknown")))

Also note that if your department ID's are numeric and are sequence, you use greater and less than rather than equals, for example IF(AND([DeptID]>=101,[DeptID]<=103),"Bob", etc. But this only works if all of the departments that belong to a person are in sequential order.

This is an old article, but still a great starting place for learning SharePoint formulas: https://support.office.com/en-us/article/examples-of-common-formulas-in-sharepoint-lists-d81f5f21-2b4e-45ce-b170-bf7ebf6988b3

| improve this answer | |
  • I am brand new to SharePoint Formuals so please ignore my ignorance. What I have is a list of 20 departments. Of those 20 depts, 5 belong to a person in our unit, 5 belong to another person in our unit and so forth. When I import the full list of over 100 people, I need to be able to have this column find those 5 depts that belong to Bill and put his name there so he can easily filter by his name. – Suzanne Jan 17 at 19:51
  • Sorry, but your question still unclear – Raf Jan 17 at 20:31
  • I edited my answer to expand upon the description of the OR function, and put together another example that I think is closer to what you seem to be trying to do. I wish there was a way to color code in our answers, to highlight the nested IF functions to show how each IF is actually the third parameter of the previous IF function, thus resulting in several ))) closing parentheses at the end -- if you have 20 different department owners, you'll end up with twenty nested IF statements, and 20 closing parentheses at the end. – willman Jan 17 at 20:40

Not the answer you're looking for? Browse other questions tagged or ask your own question.