Vlookup problem

phil_r

New Member
Joined
Oct 16, 2002
Messages
19
I'm trying to get data out of a table (database), according 2 criteria.

Example:
Column1: location
Column2: month
Columuns: data1

Location Month data1
Geneva January 23
Paris January 34
Geneva February 26
Paris February 19

How can I get data1 corresponding to Location(x)-Month(y)?

Typical Query: value of data1 in February in Geneva.
Expected outcome: 26

How can I do that?

Thanks in advance
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
On 2002-10-17 08:00, phil_r wrote:
I'm trying to get data out of a table (database), according 2 criteria.

Example:
Column1: location
Column2: month
Columuns: data1

Location Month data1
Geneva January 23
Paris January 34
Geneva February 26
Paris February 19

How can I get data1 corresponding to Location(x)-Month(y)?

Typical Query: value of data1 in February in Geneva.
Expected outcome: 26

How can I do that?

Thanks in advance

If your data is in rows 2 - 11.

In A15 enter Location Name ie PARIS
In A16 Enter month January (May be wise to format Month as Text that way it will eliminate a problem with different days in a month)

A17 = SUMPRODUCT((A2:A11=A15)*(B2:B11=A16)*(B2:B11))



_________________
Hope This Helps.
Sean.<A HREF= "http://website.lineone.net/~s-o-s/Index.html">
image001.gif

Win98, XL2000

edit to change A16 to A17
This message was edited by s-o-s on 2002-10-17 08:13
 
Upvote 0
This formula:

=SUMPRODUCT((A2:A5="Geneva")*(B2:B5="February"),C2:C5)

You can replace hard coded bits eg "Geneva" with cell references.
 
Upvote 0

Forum statistics

Threads
1,214,631
Messages
6,120,645
Members
448,974
Latest member
DumbFinanceBro

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top