Finding a value based on contents of two cells

X

xjetjockey

My list has 3 columns:

Column A Column B Column C
County State Office
Hall GA XYZ Office
Fulton GA ABC Office
Cuyahoga OH DEF Office

Etc, for about 500 rows.

I need to find the office that handles the county/state combo listed in
Column C. Some county names are replicated in other states, so I need
the one for the specific state.

The reference cells are: County will be in cell G1, and State in H1.
These values are the result of a vlookup on another sheet.

How do I do this, please? Either a VBA or the formula would be great.

Thanks in advance.

Robert
 
T

T. Valko

Try this:

Entered as an array using the key combination of CTRL,SHIFT,ENTER (not just
ENTER):

=IF(COUNTA(G1:H1)<2,"",INDEX(C2:C4,MATCH(1,(A2:A4=G1)*(B2:B4=H1),0)))

Biff
 

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