IF function with many conditions
I have an internal client who wants to parse a list of 100 different zip codes, and depending on the zip, assign another text field into a different field.
In other words, IF zip code = 11733 OR 11725 OR 11890 (and so on) THEN assign to New York.
Maybe there is a way other than using IF?
Thanks for any help you can provide,
Grace Barry
Comments
-
There is a MUCH easier route than trying to use a bunch of IF's. Build a table as below (column names in bold):
StateT ZipT
NY ####1
NY ####2
WV ####3
MD ####4
NY ####5
You can then use
=INDEX(StateT:StateT, MATCH([Zipcode Column Name]@row, ZipT:ZipT, 0))
This will look down your list of zipcodes in your table and pull the state from the same row. The table can be sorted, added to, rows deleted, rows changed, and will still work. This can also be used with cross sheet references if you wanted to keep your table separate from the main sheet.
-
Paul, thank you for the prompt reply. I am excited to try this. I'll let you know my results.
Grace
-
I would suggest starting off small scale. Just a few zips and states to make sure it works and is actually what you need. No sense building a huge setup only to find it isn't quite the solution you needed.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.2K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 142 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!