 Highlighted

# Formula help needed; IF or IFS?

AF2, AF6, AF10 and AF16 have several zip codes separated by a comma. I know V2 is listed in AF16 but I keep getting False as the answer. How can I correct this formula? Using 365.

=IF(V2=AF2,"Coastal",IF(V2=AF6,"Zone A",IF(V2=AF10,"Zone B",(IF(V2=AF16,"Zone C")))))

6 Replies
Highlighted

# Re: Formula help needed; IF or IFS?

In general formula is correct, something is with values. Try in any empty cell =V2=AF16 if it returns TRUE or FALSE

Highlighted

# Re: Formula help needed; IF or IFS?

I have zip codes like this in those cells.

 77414,77422,77465,77534,77541,77550,77551,77554,77563,77577,77623
Highlighted

# Re: Formula help needed; IF or IFS?

Perhaps like this with

``````=IF(V2="","zip is not defined",
IF(COUNTIF(\$AE\$2,"*"&V2&"*"),"Coastal",
IF(COUNTIF(\$AE\$6,"*"&V2&"*"),"Zone A",
IF(COUNTIF(\$AE\$10,"*"&V2&"*"),"Zone B",
IF(COUNTIF(\$AE\$16,"*"&V2&"*"),"Zone C",
"wrong zip"
)))))``````
Highlighted

# Re: Formula help needed; IF or IFS?

Nope didn't work. Thanks so much for trying though.
Highlighted

# Re: Formula help needed; IF or IFS?

YAYYYY! Success, I changed the "wrong zip" to "Not Listed" but other than that, your formula worked. Now I need to learn/understand the reasoning behind this so I can retain the thought process.

Thank you so much!!

Highlighted

# Re: Formula help needed; IF or IFS?

@YvetteGarza , you are welcome. Not sure how you reproduced the formula, better to take not from post but from the file attached to it.