VLOOKUP when a range resides in Column A

G

Guest

I'm quite familiar with the various LOOKUP functions, but do not know how to
do this:

Column A has a list of zip codes (first three numbers only) and Column B has
a value associated with the zip code.

The data in Column A can either be three digits (908) or a range of zip
codes (908-909) and represented as I have shown.

What function is used to LOOKUP the value in Column B when the input the
user will provide will only be the first three digits of the zip? If the data
in Column A were only three digits for every row (908), that is
straightforward. Not sure how it works if Excel needs to analyze the input to
determine if the corresponding value resides on a row where a range (908-909)
is present.

TIA

Rich
 
G

Guest

With value in C1 e.g. 908

=INDEX($B$1:$B$100,MATCH(C1,LEFT($A$1:$A$100,3),0))

Enter with Ctrl+Shift+Enter

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top