How to use multiple if statements in a SharePoint calculated column?
Posted on 2011-02-14
I have a SharePoint 2007 list. In it, I have a "Room Numbers" column (type: single line of text**)
I would like to group this list based on several "zones".
For example, for all list items that contain a room number between 1100-1800 group them as "1100-1800". Likewise for all list items that contain a room number between 2100-2800 group them as "2100-2800". This will continue to include more "zones".
I thought the best way to create these "zones" is to use a calculated column ("Zone" with a formula that includes multiple if statements. I can't determine if SharePoint 2007 allows this.
Here is what I have so far as a forumula in my "Zone" calculated column:
=IF(OR([Room number]>1100,[Room number]<1900),"1100-1800","")
What is the correct syntax to create additional ranges?
Is there a way to add multiple if statements or is there a better way to do this?
**I realize the column type really should be number, but I wanted an "out of the box" way to display the four digit numbers without a comma between the first and second digits.