Help

IF any of the following values, then X

Topic Labels: Formulas
798 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Lance_Devore
5 - Automation Enthusiast
5 - Automation Enthusiast

Hello,

I’m writing a formula to tell me the DMA region of a client based on a list of zip codes. Here’s my formula so far:

IF({Zip Code}=‘34471’,‘Tampa’,IF({Zip Code}=‘32703’,‘Orlando’,‘Other’))

I just need to know how to turn ‘34471’ and ‘32703’ into a list of zip codes (I already have the list), where ‘Tampa’ or ‘Orlando’ could be triggered for any match in that list.

Thanks!

1 Reply 1

Hi @Lance_Devore - unfortunately, there isn’t a way in a formula to do this (pseudo code):

IF({Zip Code} is one of [12345, 12346, 12347], 'Tampa', etc)

Two ways you could get around this:

  • Have the zip codes and regions in another table and make a link field from your addresses table to this zip codes table. Then copy your address zip code into the zip codes link field and you can then lookup up the region/town in another field, like this:

Screenshot 2020-04-22 at 15.12.27

Screenshot 2020-04-22 at 15.12.33

Screenshot 2020-04-22 at 15.12.42

(You can copy and paste multiple cells at a time).

  • The second way would be to have a separate zip codes table again but have a script (new scripting block) that does the lookup and populates the region value against the address.

JB