VLOOKUP - Multiple Criteria

gregula82

New Member
Joined
Aug 18, 2006
Messages
8
Hi Everyone,

I was wondering whether anyone knew of a way of performing a VLOOKUP function which has multiple criteria. e.g. the lookup value would have 3 separate criteria and then you put the table array in and the column index.

Any ideas???

Thanks.

Greg.
 
I'm not using sumifs and averageifs with the lookup formula.
I tough that the solution was by using the lookup formula and I tried a few things. But using just sumifs or averageifs I get what I need.
 
Last edited:
Upvote 0

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
I'm not using sumifs and averageifs with the lookup formula.
I tough that the solution was by using the lookup formula and I tried a few things. But using just sumifs or averageifs I get what I need.

It is better to post a sample of representative data, so you can avoid getting formulas, supposed to work on non-existing data.
 
Upvote 0
I was having a similar problem with searching on multiple criteria and the solutions offered here in this thread very insightful, easy to follow. Hat's off to T.Valko and Aladin. Thanks again for your great help.
 
Upvote 0
I was having a similar problem with searching on multiple criteria and the solutions offered here in this thread very insightful, easy to follow. Hat's off to T.Valko and Aladin. Thanks again for your great help.

It's pleasing to know that. Thanks for the kind feedback.
 
Upvote 0
All, I've read through this thread and tried many of the formulas, but unfortunately cannot make my lookup work. I'm attempting to pull a number of hours for a specific employee and charge code for a month from one sheet into another, and can't seem to make the formulas work. The sheets are inserted below.


[TABLE="width: 803"]
<tbody>[TR]
[TD]Charge Number
[/TD]
[TD]Employee Name: Last, First
[/TD]
[TD="align: right"]Sep-13
[/TD]
[TD="align: right"]Oct-13
[/TD]
[TD="align: right"]Nov-13
[/TD]
[TD="align: right"]Dec-13
[/TD]
[TD="align: right"]Jan-14
[/TD]
[TD="align: right"]Feb-14
[/TD]
[TD="align: right"]Mar-14
[/TD]
[/TR]
[TR]
[TD]AFNC12345
[/TD]
[TD]Dole, Bob
[/TD]
[TD="align: right"]152
[/TD]
[TD="align: right"]152
[/TD]
[TD="align: right"]152
[/TD]
[TD="align: right"]176
[/TD]
[TD="align: right"]161
[/TD]
[TD="align: right"]64.5
[/TD]
[TD="align: right"]96.5
[/TD]
[/TR]
[TR]
[TD]AFNC12345
[/TD]
[TD]Smith, John
[/TD]
[TD="align: right"]152
[/TD]
[TD="align: right"]156
[/TD]
[TD="align: right"]146
[/TD]
[TD="align: right"]134
[/TD]
[TD="align: right"]146
[/TD]
[TD="align: right"]10.5
[/TD]
[TD="align: right"]6
[/TD]
[/TR]
[TR]
[TD]AFNC12345
[/TD]
[TD]Doe, Jane
[/TD]
[TD="align: right"]123.5
[/TD]
[TD="align: right"]156
[/TD]
[TD="align: right"]134.5
[/TD]
[TD="align: right"]113
[/TD]
[TD="align: right"]59.5
[/TD]
[TD="align: right"]88
[/TD]
[TD="align: right"]117
[/TD]
[/TR]
[TR]
[TD]AFNC12345
[/TD]
[TD]Dockins, Larry
[/TD]
[TD="align: right"]149.5
[/TD]
[TD="align: right"]141
[/TD]
[TD="align: right"]136.5
[/TD]
[TD="align: right"]169
[/TD]
[TD="align: right"]127.5
[/TD]
[TD="align: right"]84.5
[/TD]
[TD="align: right"]132
[/TD]
[/TR]
[TR]
[TD]AFNC12345
[/TD]
[TD]Bennet, Tony
[/TD]
[TD="align: right"]144
[/TD]
[TD="align: right"]152
[/TD]
[TD="align: right"]147
[/TD]
[TD="align: right"]176
[/TD]
[TD="align: right"]62
[/TD]
[TD="align: right"]140.5
[/TD]
[TD="align: right"]183
[/TD]
[/TR]
[TR]
[TD]AFNC12345
[/TD]
[TD]Matthias, Carol
[/TD]
[TD="align: right"]108
[/TD]
[TD="align: right"]160
[/TD]
[TD="align: right"]152
[/TD]
[TD="align: right"]200
[/TD]
[TD="align: right"]160
[/TD]
[TD="align: right"]160
[/TD]
[TD="align: right"]200
[/TD]
[/TR]
[TR]
[TD]BGOD23456
[/TD]
[TD]Dole, Bob
[/TD]
[TD="align: right"]31
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]BGOD23456
[/TD]
[TD]Smith, John
[/TD]
[TD="align: right"]148
[/TD]
[TD="align: right"]134
[/TD]
[TD="align: right"]136
[/TD]
[TD="align: right"]172.5
[/TD]
[TD="align: right"]166
[/TD]
[TD="align: right"]136
[/TD]
[TD="align: right"]193.5
[/TD]
[/TR]
[TR]
[TD]BGOD23456
[/TD]
[TD]Doe, Jane
[/TD]
[TD="align: right"]113
[/TD]
[TD="align: right"]77.5
[/TD]
[TD="align: right"]155.5
[/TD]
[TD="align: right"]36.5
[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

The upper sheet has all of the data - trying to look up a number in that sheet (hours) based on the Charge Number, Name, and Date in the next sheet. The formula below was one I was trying to use, but couldn't seem to make it work.

=LOOKUP(2,(('Labor pivot'!$A:$A=Labor!$E9)*('Labor pivot'!$B:$B=Labor!$F9)*('Labor pivot'!$H$2=Labor!T$2)),$C$2:$C$1000)
[TABLE="width: 925"]
<tbody>[TR]
[TD]Role
[/TD]
[TD]Charge Number
[/TD]
[TD]Name
[/TD]
[TD="align: right"]Sep-13
[/TD]
[TD="align: right"]Oct-13
[/TD]
[TD="align: right"]Nov-13
[/TD]
[TD="align: right"]Dec-13
[/TD]
[TD="align: right"]Jan-14
[/TD]
[TD="align: right"]Feb-14
[/TD]
[TD="align: right"]Mar-14
[/TD]
[/TR]
[TR]
[TD]Program Management
[/TD]
[TD]AFNC12345
[/TD]
[TD]Smith, John
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Program Management
[/TD]
[TD]AFNC12345
[/TD]
[TD]Doe, Jane
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Program Management
[/TD]
[TD]AFNC12345
[/TD]
[TD]Dockins, Larry
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Development
[/TD]
[TD]BGOD23456
[/TD]
[TD]Dole, Bob
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Development
[/TD]
[TD]BGOD23456
[/TD]
[TD]Smith, John
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Any help would be great, thank you!
 
Upvote 0
Thanks for the explanation, I always wondered what the 1 function was. I played around the this function using the F9 key and now I see.
 
Upvote 0
Let's Sheet1 house the data (the first exhibit) and Sheet2 the second exhibit.

Insert a new column before the current first column.

In A1 enter: Idx (from indexing).

A2, control+shift+enter, not just enter, and copy down:
Rich (BB code):
=IFERROR(SMALL(IF(Sheet1!$A$2:$A$10=$C2,Sheet1!$B$2:$B$10=$D2,
  ROW(Sheet1!$A$2:$A$10)-ROW(Sheet1!$A$2)+1),ROWS($A$2:A2)),"")

E2, just enter, copy across, and down:
Rich (BB code):
=IF($A2="","",INDEX(Sheet1!$C$2:$I$10,$A2,MATCH(E$1,Sheet1!$C$1:$I$1,0)))
 
Upvote 0
It's pleasing to know that. Thanks for the kind feedback.

Hi I am trying to use index/match function as explained in this thread but quite not get it working for my situation.

Problem: I am required to produce a weekly report to check the variances against the working day 1 forecast with weekly actuals.
Sheet 1: Working Day 1 Forecast:
On day 1 of every month, I receive a report having the following information
Month, Programme ID, Project ID, Resource Name,Task Name, planned hours, planned cost.

Sheet 2: Weekly Actuals:
Every Friday, I receive the weekly actuals with the following information.

Month, Programme ID, Project ID, Resource Name, Task Name, Actual Hours, Actual Cost.

Sheet 3: Weekly MI Report:

The report I produce weekly have the following columns

Month, Programme ID, Project ID, Resource Name, Task Name, WD1 Planned Hours, WD1 Planned cost, Actual hours, Actual Cost, var in hours, var in cost.

For this report, The WD1 planned hours and WD planned cost in Sheet 3 need to be populated weekly basis by comparing the first five columns in Sheet 1 with the first five columns in Sheet 3. The rest of the data I just populate from Sheet 2 except for Variances which are calculated fields.

The no. of records in Sheet 3 are always greater than the no.of records in Sheet 1 because resources who are not included in the day1 forecast will be booking time to project and their actuals will be coming through. I want to populate 0.00 against these new resources planned cost and planned hours.

Also, the volume of rows at the beginning of the year is 6000 and it keeps increasing every week and by end of the year it can reach about 10000.

Any help is greatly appreciated.
 
Last edited:
Upvote 0
Hi I am trying to use index/match function as explained in this thread but quite not get it working for my situation.

Problem: I am required to produce a weekly report to check the variances against the working day 1 forecast with weekly actuals.
Sheet 1: Working Day 1 Forecast:
On day 1 of every month, I receive a report having the following information
Month, Programme ID, Project ID, Resource Name,Task Name, planned hours, planned cost.

Sheet 2: Weekly Actuals:
Every Friday, I receive the weekly actuals with the following information.

Month, Programme ID, Project ID, Resource Name, Task Name, Actual Hours, Actual Cost.

Sheet 3: Weekly MI Report:

The report I produce weekly have the following columns

Month, Programme ID, Project ID, Resource Name, Task Name, WD1 Planned Hours, WD1 Planned cost, Actual hours, Actual Cost, var in hours, var in cost.

For this report, The WD1 planned hours and WD planned cost in Sheet 3 need to be populated weekly basis by comparing the first five columns in Sheet 1 with the first five columns in Sheet 3. The rest of the data I just populate from Sheet 2 except for Variances which are calculated fields.

The no. of records in Sheet 3 are always greater than the no.of records in Sheet 1 because resources who are not included in the day1 forecast will be booking time to project and their actuals will be coming through. I want to populate 0.00 against these new resources planned cost and planned hours.

Also, the volume of rows at the beginning of the year is 6000 and it keeps increasing every week and by end of the year it can reach about 10000.

Any help is greatly appreciated.
 
Upvote 0
@ramgouda

To bump up, you don't need to repeat thec ontents of your post. Just "bump" would suffice. That said...

You seem to ask too much. Try to cut your question in manageable subquestions, supported with sample data and the desired output.
 
Upvote 0

Forum statistics

Threads
1,223,923
Messages
6,175,391
Members
452,640
Latest member
steveridge

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