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
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 495 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!