Vlookup into 2 columns

I

Irina

Can a Vlookup look into 2 columns for reference and then return the number?
I have a list with 3 fields from which I need to pull out the 3rd field, if the first 2 columns contain the right data. What is the best way to do that?
Ex:
State County Code
NY Essex 31
NJ Essex 13

So if State=NY and County=Essex, return 31, if state=NJ and county=Essex, return 13.
There are lots of rows, but the point is that County & State need to be looked up for the correct code to be returned.

Please help.
Thank you

Submitted via EggHeadCafe
ASP.NET Base64 Image Encoding via the Data: protocol
http://www.eggheadcafe.com/tutorial...e64-image-encoding-via-the-data-protocol.aspx
 
P

Pete

Irina:
You could use SUMIFS if there is only one numerical value for each
combination of state and county..
=SUMIFS(sum_range, criteria_range1, criteria1, [criteria_range2,
criteria2], ...)
(Sum_range, in your case would be the code column.)
Available in Excel 2007 and later.

If you have 2003 or before, SUMPRODUCT funcion would be the way to
go. That would also work with later versions.

Do report back.

Pete
 

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