Condense multiple IF statements into an OR function?
I've written a long formula for a calculated field in a Sharepoint list which maxed out the character limit. The formula contains many different conditions that would return the same value. See example below:
=IF([Request Type]="Create Metadata in MDB","Data Team",
IF([Request Type]="Update Metadata Record","Data Team",
IF([Request Type]="Process Vendor Test Cases","Data Team",
IF([Request Type]="Process Opt Out File","Data Team"
IF([Request Type]="Create Metadata in Unica","Unica Team"
..........
I thought I might be able to shorten the formula by including the conditions which return the same value in a single OR function like so:
=IF([Request Type]=OR("Create Metadata in MDB","Update Metadata Record","Process Vendor Test Cases","Process Opt Out File"),"Data Team"
...........
Although SharePoint accepts this syntax, #VALUE is returned.
Any suggestions on how to make this work? Or other suggestions on how to shorten my formula?
Thanks!
J
August 27th, 2011 10:59am
Solve by the inverse:
IF([Request Type]="Create Metadata in Unica","Unica Team","Data Team")
But if you need something more savvy,
IF(FIND([fieldname],"Option1|Option2|Option3")>0, "Result=True", "Result=False")
---
FIND and SEARCH do about the same thing:
FIND:
http://office.microsoft.com/en-us/windows-sharepoint-services-help/find-function-HA001160996.aspx
SEARCH:
http://office.microsoft.com/en-us/windows-sharepoint-services-help/search-function-HA001161062.aspx
Steve Clark, MCTS | Twin-Soft.com
Free Windows Admin Tool Kit Click here and download it now
August 27th, 2011 2:13pm