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.
 
If VLOOKUP is expected to return a text value when successful...
Rich (BB code):
=IFERROR(LOOKUP(REPT("z",255),
  CHOOSE({1,2},VLOOKUP("STT1RM2",'C:\INV\[Fix.xlsx]servers'!$A$2:$I$1409,4,0),
   VLOOKUP("STT1RM1",'C:\INV\[Fix.xlsx]servers'!$A$2:$I$1409,4,0))),"")
If VLOOKUP is expected to return a number when successful...
Rich (BB code):
=IFERROR(LOOKUP(9.99999999999999E+307,
  CHOOSE({1,2},VLOOKUP("STT1RM2",'C:\INV\[Fix.xlsx]servers'!$A$2:$I$1409,4,0),
   VLOOKUP("STT1RM1",'C:\INV\[Fix.xlsx]servers'!$A$2:$I$1409,4,0))),"")

Hope this helps.

PERFECT!!! Thank you very much!!!
 
Upvote 0

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Ok. Not sure if this can be done. I worked on this some and couldn't get close to bringing a percentile close.

I have three separate sheets with a cover sheet in which I would like to bring the top 95% of shift work to the cover sheet from each of the other sheets. This can be in one group with the sheet number in the foremost left colomn or it can be all separate as I list it below. What is key here is that I would like to retrieve the whole row, if this is possible.

Appreciate the knowledge, guys!!!

Shift 1
NameFirst RoundSecond RoundDisparity
Joe262596.15%
Mary553869.09%
Ken413892.68%
Shift 2
NameFirst RoundSecond RoundDisparity
Mark565598.21%
Larry252184.00%
Sue262076.92%
Shift 3
NameFirst RoundSecond RoundDisparity
Tom402562.50%
Mellissa11872.73%
John272696.30%
Cover Sheet
NameFirst RoundSecond RoundDisparity
Joe262596.15%
Ken413892.68%
NameFirst RoundSecond RoundDisparity
Mark565598.21%
NameFirst RoundSecond RoundDisparity
John272696.30%

<tbody>
</tbody><colgroup><col><col><col><col></colgroup>
 
Upvote 0
Kinda feel bad for reviving old thread, but i think better than creating new post.
I've been reading since page 1 but still can't figure how to figure this :


Monday
a
40
c
77
e
43
Tuesday
b
23
a
87
c
44
d
63

<tbody>
</tbody>












What i want for output is something like this

Monday
e
43
Tuesday
a
87

<tbody>
</tbody>




i tried to follow the one in page 7 but no luck since this one is unsorted, should be doable if i fill every blank cell, but is there any way without doing that? Thanks !
 
Upvote 0
Kinda feel bad for reviving old thread, but i think better than creating new post.
I've been reading since page 1 but still can't figure how to figure this :


Mondaya40
c77
e43
Tuesdayb23
a87
c44
d63

<tbody>
</tbody>












What i want for output is something like this

Mondaye43
Tuesdaya87

<tbody>
</tbody>




i tried to follow the one in page 7 but no luck since this one is unsorted, should be doable if i fill every blank cell, but is there any way without doing that? Thanks !

Row\Col
A​
B​
C​
D​
E​
F​
G​
H​
I​
1​
Mondaya
40
1​
3​
Monday e 43
2​
c
77
4​
7​
Tuesday a 87
3​
e
43
4​
Tuesdayb
23
5​
a
87
6​
c
44
7​
d
63

<tbody>
</tbody>


In E1 enter and copy down:
Rich (BB code):

=MATCH(G1,$A$1:$A$7,0)<strike></strike>

In F1 control+shift+enter, not just enter, and copy down:
Rich (BB code):

=MIN(MIN(IF(ROW($A$1:$A$7)-ROW($A$1)+1>MATCH(G1,$A$1:$A$7,0),
    IF(1-($A$1:$A$7=""),ROW($A$1:$A$7)-ROW($A$1)+1,9.99999999999999E+307)))-1,
    ROWS($A$1:$A$7))
<strike></strike>

In E1 enter and copy down:
Rich (BB code):

=VLOOKUP(H1,OFFSET(INDEX($B$1:$B$7,E1),0,0,F1-E1+1,2),2,0)
<strike></strike>
 
Upvote 0
omg this really works, may i ask what is F1 and F2 for? i can't really seems to figure how.

E1:F1 allows us to compute the borders (location) of the table that involves the value of G1. VLOOKUP does a look up into the table the OFFSET bit constructs from the border values in E1:F1. Copied down, this process cascades for all G-values.

But the formula above indeed works, thanks a lot !

You are welcome.
 
Upvote 0
E1:F1 allows us to compute the borders (location) of the table that involves the value of G1. VLOOKUP does a look up into the table the OFFSET bit constructs from the border values in E1:F1. Copied down, this process cascades for all G-values.

ohhh everything makes sense now, i thought bout this before but never able to put it down to formulas, thanks again for explanation !
 
Upvote 0
From the formula above, now i'm trying to do a lookup for every fruit that sold in day 1 from shop1 and shop2, then put it at daily sheet report without any duplicate.
but it ends up very ugly due to the veeery long formula, and i have like 30+ shops to be listed.
Ii can't really figure to make it simpler. :(
Is there any way to make this better?
Because i need it to automatically update whenever there's change in fruit or quantity.
Below is the excel file :

http://seilent.org/data/sample.xlsx

Sorry I think i'm asking too much
Thanks !
 
Upvote 0

Forum statistics

Threads
1,214,789
Messages
6,121,593
Members
449,038
Latest member
Arbind kumar

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