Hi, I have a problem to generate a ZIP code from a given address. I tried Index+match and If+iserror+search but I cannot because the address is too long and the reference is shorter.
I have attached a sample file on it.
thanks in advanced.
Hi, I have a problem to generate a ZIP code from a given address. I tried Index+match and If+iserror+search but I cannot because the address is too long and the reference is shorter.
I have attached a sample file on it.
thanks in advanced.
Try this...
=LOOKUP(1,-SEARCH($A$2:$A$27,F6),$C$2:$C$27)
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
Hello,
I think you meant to lookup by Zip Code so I used index match formula to get the Municipal/City and Province.
This formula then drag over:
Formula:![]()
![]()
=INDEX(A$2:A$27,MATCH($F$2,$C$2:$C$27,0))
And that is the way your selected location will be formatted? Not knowing your area, can there be the same named Municipality/City in more than one province? Because this would require matching on both locations.
Will addresses be that way where the municipality is ALWAYS after the second comma and before the province?
Is there any way you can adjust the address to simply have the Municipality/City alone - this would obviously simplify the formula greatly.
Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
Sam Capricci
My apologies I attached the ability to lookup by Zip Code or Municipal/City.
Please see attached
Check the attached revision in #6 it should work for you.
Happy to help and thanks for the feedback![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks