Multiple Criteria INDEX and MATCH CSE Array Formula

Trailer Parts

New Member
Joined
Aug 25, 2018
Messages
1
As I searched for CSE Array Formula examples, I found few that were a complex as I sometimes need to find data in massive spreadsheets. So now that I finally figured out how to use these formulas, with help from a few on this forum, I wanted to post what I know and ask for guidance if I am off base or on track.



INDEX AND MATCH, the new VLOOKUP


If you have a value (our cost) to lookup on another sheet basedon a value (our part number), we all know that a VLOOKUP returns that datarather easily and quickly saving lots of time.


However, if you need to lookup up a value (our cost) on anysheet based on more than one value (our part number and a vendor partnumber), then INDEX and MATCH is a better “VLOOKUP” saving much frustration andvaluable time.


Let’s use the example below as our lookup values. This is Tab1.


[TABLE="width: 447"]
<tbody>[TR]
[TD="width: 42"][/TD]
[TD="width: 185"]
A
[/TD]
[TD="width: 185"]
B
[/TD]
[TD="width: 185"]
C
[/TD]
[/TR]
[TR]
[TD="width: 42"]
1
[/TD]
[TD="width: 185"]ITEM NUMBER

[/TD]
[TD="width: 185"][/TD]
[TD="width: 185"][/TD]
[/TR]
[TR]
[TD="width: 42"]
2
[/TD]
[TD="width: 185, bgcolor: transparent"]8375545W-2B
[/TD]
[TD="width: 185, bgcolor: transparent"][/TD]
[TD="width: 185, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="width: 42"]
3
[/TD]
[TD="width: 185, bgcolor: transparent"]345545SM-5C
[/TD]
[TD="width: 185, bgcolor: transparent"][/TD]
[TD="width: 185, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="width: 42"]
4
[/TD]
[TD="width: 185, bgcolor: transparent"]345545WM-5C
[/TD]
[TD="width: 185, bgcolor: transparent"][/TD]
[TD="width: 185, bgcolor: transparent"][/TD]
[/TR]
</tbody>[/TABLE]


TAB1


The chart below will be our lookup location of what we wantto ‘pull back’ to our value above. Thiswill be Tab2.



<tbody>
[TD="width: 120"]
A
[/TD]
[TD="width: 216"]
B
[/TD]
[TD="width: 138"]
C
[/TD]
[TD="width: 84"]
D
[/TD]

[TD="width: 42"]
1
[/TD]
[TD="width: 120"] ITEM NUMBER

[/TD]
[TD="width: 216"] DESCRIPTION
[/TD]
[TD="width: 138"] CATEGORY
[/TD]
[TD="width: 84"] COST

[/TD]

[TD="width: 42"]
2
[/TD]
[TD="width: 120, bgcolor: transparent"] 8375545W-2B
[/TD]
[TD="width: 216, bgcolor: transparent"] 8x3.75 545 WHL W/5.70-8 LRB TIRE
[/TD]
[TD="width: 138, bgcolor: transparent"] WHEEL & TIRE ASSY
[/TD]
[TD="width: 84, bgcolor: transparent"] $10.25
[/TD]

[TD="width: 42"]
3
[/TD]
[TD="width: 120, bgcolor: transparent"] 560655WS-1C
[/TD]
[TD="width: 216, bgcolor: transparent"] 15x6 545 PVDCRMOD W/ST205/75R LRC TIRE
[/TD]
[TD="width: 138, bgcolor: transparent"] WHEEL & TIRE ASSY
[/TD]
[TD="width: 84, bgcolor: transparent"] $55.87
[/TD]

[TD="width: 42"]
4
[/TD]
[TD="width: 120, bgcolor: transparent"] 0856545B-3C
[/TD]
[TD="width: 216, bgcolor: transparent"] SERIES 8 ALUM BLK MOD 545 W/ST205/75R LRC TIRE
[/TD]
[TD="width: 138, bgcolor: transparent"] WHEEL & TIRE ASSY
[/TD]
[TD="width: 84, bgcolor: transparent"] $80.60
[/TD]

[TD="width: 42"]
5
[/TD]
[TD="width: 120, bgcolor: transparent"] 345545WM-5C
[/TD]
[TD="width: 216, bgcolor: transparent"] 13x4 545 WM W/ST175/80 LRB TIRE
[/TD]
[TD="width: 138, bgcolor: transparent"] WHEEL & TIRE ASSY
[/TD]
[TD="width: 84, bgcolor: transparent"] $25.31
[/TD]

[TD="width: 42"]
6
[/TD]
[TD="width: 120, bgcolor: transparent"] 345545SM-5C
[/TD]
[TD="width: 216, bgcolor: transparent"] 13x4 545 SM W/ST175/80 LRB TIRE
[/TD]
[TD="width: 138, bgcolor: transparent"] WHEEL & TIRE ASSY
[/TD]
[TD="width: 84, bgcolor: transparent"] $25.31
[/TD]

[TD="width: 42"]
7
[/TD]
[TD="width: 120, bgcolor: transparent"] 460545WS-5C
[/TD]
[TD="width: 216, bgcolor: transparent"] 14X6 WS 545 W/ST205/75D LRC TIRE
[/TD]
[TD="width: 138, bgcolor: transparent"] WHEEL & TIRE ASSY
[/TD]
[TD="width: 84, bgcolor: transparent"] $27.49
[/TD]

[TD="width: 42"]
8
[/TD]
[TD="width: 120, bgcolor: transparent"] 870545W-4C
[/TD]
[TD="width: 216, bgcolor: transparent"] 8X7 545 WHT WHL W/18.5x8.50-8 LRC TIRE
[/TD]
[TD="width: 138, bgcolor: transparent"] WHEEL & TIRE ASSY
[/TD]
[TD="width: 84, bgcolor: transparent"] $26.17
[/TD]

</tbody>


TAB2


Since our desired data is on Tab2, we will need to index it. The formula for indexing it is


=INDEX($A$1:$D$7) Now is when it gets a bit tricky.If you just hit enter now, you won’t reallyget any result of value because index only gives you a place to look.The INDEX itself is almost useless if youstopped here.So really, you shouldn’thave typed anything yet.


But if we MATCH our lookup value (Tab1) to the index, thenwe get a result.


Before we type, let me explain the match. The MATCH will kind of be like a VLOOKUPexcept it’s called MATCH.=MATCH(A2,TAB2!$A:$D,0,4)The VLOOKUP for this would be =VLOOKUP($A2,TAB2!$A:$D,4,FALSE).The False in the vlookup is the 0 in theMATCH.It’s the MATCH TYPE, we use FALSEor 0 which means we want an EXACT MATCH.The 4 in the VLOOKUP is the column you want returned.The 4 in the MATCH is the column you want returned.Same concept, just a little reversed.Bill Gates keeping up on our toes, I suppose!


So, In Tab1, column B next to your Item Number (lookup value),you would type the formula for INDEX and MATCH.


Let me explain a couple of things. The ! in your formula means that it is a tabor page name ending.The $ means thatyou want to keep that lookup in that row or column.You don’t want it to change.So if we put $A2, it means that we want it tolook in A2 through A99999 but definitely staying in A.If you input $A$2, then it means that we wantit to look in “A2 only” for that lookup.If you only put A2 without the $, then you’re basically saying lookanywhere for the lookup value.That iswhen you can really pull some data that just don’t add up (because it doesn’t –it is wrong most of the time).However, whenusing your lookup value, you’ll want to leave off the $ or you’ll getjust one result for your entire spreadsheet.If $A$2 is your lookup value, then all results returned will be based onA2 only.


Now for inputting the INDEX / MATCH formula, in TAB1 (thechart you’re working to populate), next to your item number (lookup value) CellB2, type the following:


=INDEX(TAB2!$A$1:$D$7,MATCH(A2,TAB2!$A$1:$A$7,0),4)and hit enter.


Nothing happened, right? Well, you got an error.It isbecause the INDEX / MATCH is what is called an ARRAY FORMULA, or some call it aCSE FORMULA.It’s nickname is becauseyou have to Hold the Control and Shift Keys and Hit Enter (CSE = Control,Shift, Enter).The Curser must be in theACTION Field to make the CSE Array Formula to work.


But notice something else that I changed that if important(if you want a result other than error).


=INDEX(TAB2!$A$1:$D$7,MATCH(A2,TAB2!$A$1:$A$7,0),4)and hit enter.The INDEX formula remainsas it was looking at the entire “ARRAY” or tab that you want to find somethingin, but the ARRAY in the MATCH is only looking in the column that you want tofind the lookup value (item number).Iknow my item number is in column A of Tab2, so I have it look at TAB2!$A$1:$A$7.If my item number was in column B, then I wouldsimply change my match array to TAB2!$B$1:$B$7, even if my index was still A:D.You would change the lookup column of 4 to 3because if your look value is in column B, you’re now starting your lookup incolumn B so you want column 3 returned rather than 4, right?


Now you’re probably thinking, I could do this faster with aVLOOKUP. You’re right, you could andshould if it is that simple.But if you’rebeyond that simple search to a more complex one, then we need to change the formulasome.


[TABLE="width: 467"]
<tbody>[TR]
[TD="width: 42"][/TD]
[TD="width: 157"]
A
[/TD]
[TD="width: 135"]
B
[/TD]
[TD="width: 152"]
C
[/TD]
[TD="width: 138"]
D
[/TD]
[/TR]
[TR]
[TD="width: 42"]
1
[/TD]
[TD="width: 157"]ITEM NUMBER
[/TD]
[TD="width: 135"]VENDOR
[/TD]
[TD="width: 152"]VENDOR NUMBER
[/TD]
[TD="width: 138"]COST
[/TD]
[/TR]
[TR]
[TD="width: 42"]
2
[/TD]
[TD="width: 157, bgcolor: transparent"]8375545W-2B
[/TD]
[TD="width: 135, bgcolor: transparent"]CURT
[/TD]
[TD="width: 152, bgcolor: transparent"]123456
[/TD]
[TD="width: 138, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="width: 42"]
3
[/TD]
[TD="width: 157, bgcolor: transparent"]345545SM-5C
[/TD]
[TD="width: 135, bgcolor: transparent"]BUYERS
[/TD]
[TD="width: 152, bgcolor: transparent"]123654
[/TD]
[TD="width: 138, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="width: 42"]
4
[/TD]
[TD="width: 157"]345545WM-5C
[/TD]
[TD="width: 135, bgcolor: transparent"]CURT
[/TD]
[TD="width: 152, bgcolor: transparent"]123585
[/TD]
[TD="width: 138, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="width: 42"]
5
[/TD]
[TD="width: 157"]345545WM-5C
[/TD]
[TD="width: 135, bgcolor: transparent"]BUYERS
[/TD]
[TD="width: 152, bgcolor: transparent"]125223
[/TD]
[TD="width: 138, bgcolor: transparent"][/TD]
[/TR]
</tbody>[/TABLE]


TAB1


Notice that we have a duplicate lookup value (item number) becausethis item is potentially supplied by more than one vendor. In this case, fictitiously Curt and Buyers.We want to ensure that that cost we’repulling back to column C is accurately CURT and BUYERS, respectively.



<tbody>
[TD="width: 105"]
A
[/TD]
[TD="width: 160"]
B
[/TD]
[TD="width: 111"]
C
[/TD]
[TD="width: 70"]
D
[/TD]
[TD="width: 70"]
E
[/TD]
[TD="width: 75"]
F
[/TD]

[TD="width: 32"]
1
[/TD]
[TD="width: 105"] ITEM NUMBER

[/TD]
[TD="width: 160"] DESCRIPTION
[/TD]
[TD="width: 111"] CATEGORY

[/TD]
[TD="width: 70"] COST
[/TD]
[TD="width: 70"] VENDOR
[/TD]
[TD="width: 75"] VENDOR#

[/TD]

[TD="width: 32"]
2
[/TD]
[TD="width: 105, bgcolor: transparent"] 8375545W-2B

[/TD]
[TD="width: 160, bgcolor: transparent"] 8x3.75 545 WHL W/5.70-8 LRB TIRE

[/TD]
[TD="width: 111, bgcolor: transparent"] WHEEL & TIRE ASSY
[/TD]
[TD="width: 70, bgcolor: transparent"] $10.25
[/TD]
[TD="width: 70, bgcolor: transparent"] CURT
[/TD]
[TD="width: 75, bgcolor: transparent"] 123456

[/TD]

[TD="width: 32"]
3
[/TD]
[TD="width: 105, bgcolor: transparent"] 560655WS-1C
[/TD]
[TD="width: 160, bgcolor: transparent"] 15x6 545 PVDCRMOD W/ST205/75R LRC TIRE
[/TD]
[TD="width: 111, bgcolor: transparent"] WHEEL & TIRE ASSY
[/TD]
[TD="width: 70, bgcolor: transparent"] $55.87
[/TD]
[TD="width: 70, bgcolor: transparent"] BUYERS
[/TD]
[TD="width: 75, bgcolor: transparent"] 252125

[/TD]

[TD="width: 32"]
4
[/TD]
[TD="width: 105, bgcolor: transparent"] 0856545B-3C
[/TD]
[TD="width: 160, bgcolor: transparent"] SERIES 8 ALUM BLK MOD 545 W/ST205/75R LRC TIRE
[/TD]
[TD="width: 111, bgcolor: transparent"] WHEEL & TIRE ASSY
[/TD]
[TD="width: 70, bgcolor: transparent"] $80.60
[/TD]
[TD="width: 70, bgcolor: transparent"] BUYERS
[/TD]
[TD="width: 75, bgcolor: transparent"] 325212
[/TD]

[TD="width: 32"]
5
[/TD]
[TD="width: 105, bgcolor: transparent"] 345545WM-5C
[/TD]
[TD="width: 160, bgcolor: transparent"] 13x4 545 WM W/ST175/80 LRB TIRE
[/TD]
[TD="width: 111, bgcolor: transparent"] WHEEL & TIRE ASSY
[/TD]
[TD="width: 70, bgcolor: transparent"] $25.31
[/TD]
[TD="width: 70, bgcolor: transparent"] CURT
[/TD]
[TD="width: 75, bgcolor: transparent"] 123585
[/TD]

[TD="width: 32"]
6
[/TD]
[TD="width: 105, bgcolor: transparent"] 345545WM-5C
[/TD]
[TD="width: 160, bgcolor: transparent"] 13x4 545 WM W/ST175/80 LRB TIRE
[/TD]
[TD="width: 111, bgcolor: transparent"] WHEEL & TIRE ASSY
[/TD]
[TD="width: 70, bgcolor: transparent"] $20.89
[/TD]
[TD="width: 70, bgcolor: transparent"] BUYERS
[/TD]
[TD="width: 75, bgcolor: transparent"] 125223
[/TD]

[TD="width: 32"]
7
[/TD]
[TD="width: 105, bgcolor: transparent"] 345545SM-5C
[/TD]
[TD="width: 160, bgcolor: transparent"] 13x4 545 SM W/ST175/80 LRB TIRE
[/TD]
[TD="width: 111, bgcolor: transparent"] WHEEL & TIRE ASSY
[/TD]
[TD="width: 70, bgcolor: transparent"] $25.31
[/TD]
[TD="width: 70, bgcolor: transparent"] BUYERS
[/TD]
[TD="width: 75, bgcolor: transparent"] 123654
[/TD]

[TD="width: 32"]
8
[/TD]
[TD="width: 105, bgcolor: transparent"] 460545WS-5C
[/TD]
[TD="width: 160, bgcolor: transparent"] 14X6 WS 545 W/ST205/75D LRC TIRE
[/TD]
[TD="width: 111, bgcolor: transparent"] WHEEL & TIRE ASSY
[/TD]
[TD="width: 70, bgcolor: transparent"] $27.49
[/TD]
[TD="width: 70, bgcolor: transparent"] CURT
[/TD]
[TD="width: 75, bgcolor: transparent"] 452112
[/TD]

[TD="width: 32"]
9
[/TD]
[TD="width: 105, bgcolor: transparent"] 870545W-4C
[/TD]
[TD="width: 160, bgcolor: transparent"] 8X7 545 WHT WHL W/18.5x8.50-8 LRC TIRE
[/TD]
[TD="width: 111, bgcolor: transparent"] WHEEL & TIRE ASSY
[/TD]
[TD="width: 70, bgcolor: transparent"] $26.17
[/TD]
[TD="width: 70, bgcolor: transparent"] BUYERS
[/TD]
[TD="width: 75, bgcolor: transparent"] 854521
[/TD]

</tbody>


TAB2


So now, it seems to be more complicated. We want to use our lookup chart (Tab1), tocompare Column A to Tab2 Column A, but also not return a result unlessColumn C in Tab1 matches Column F in Tab2.


The INDEX FORMULA will change a bit because our INDEX ARRAYis larger. =INDEX($A$1:$F$9)


The MATCH FOMULA changes some too because we have more thanone lookup.


When MATCH changes to more than one lookup, we have to movesome things around from the single lookup (again, I think just because BillGates is seeing how smart we are). NOTE:The * Asterisk is tellingthe formula “AND”.It says to do what isthe in parenthesis AND this one too, * AND this one too.


=INDEX(TAB2!$A$1:$F$7,MATCH(A2,TAB2!$A$1:$A$7,0),4) and hitenter.


=INDEX(TAB2!$A$1:$F$9,(1,(MATCH(TAB2!$A$1:$A$9=A2)*(TAB2!$F$1:$F$9=C2),0,4) and hit CSE.


Sometimes, you might have the same part number used for multiplevendors that for whatever reason also used the same part number, then you can justadd another ‘check’ into your formula.


So if you want it to check to ensure the vendor item matchesand the vendor, then you would just add another condition.


=INDEX(TAB2!$A$1:$F$9,(1,(MATCH(TAB2!$A$1:$A$9=A2)*(TAB2!$F$1:$F$9=C2)*(TAB2!$E$1:$E$9=B2),0,4) and hit CSE.The column you’re pulling is always based onyour INDEX…A.If your INDEX was J, thenyou would count columns from J.In thiscase you’re still pulling the 4th column, which is the cost.Good luck!


[TABLE="width: 604"]
<tbody>[TR]
[TD="width: 101, bgcolor: black"]ITEM NUMBER
[/TD]
[TD="width: 64, bgcolor: black"]VENDOR
[/TD]
[TD="width: 64, bgcolor: black"]VENDOR NUMBER
[/TD]
[TD="width: 64, bgcolor: black"]COST
[/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="width: 101, bgcolor: transparent"]8375545W-2B
[/TD]
[TD="width: 64, bgcolor: transparent"]CURT
[/TD]
[TD="width: 64, bgcolor: transparent, align: right"]123456
[/TD]
[TD="width: 64, bgcolor: transparent"]$10.25
[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"]VLOOKUP
[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="width: 101, bgcolor: transparent"]345545SM-5C
[/TD]
[TD="width: 64, bgcolor: transparent"]BUYERS
[/TD]
[TD="width: 64, bgcolor: transparent, align: right"]123654
[/TD]
[TD="width: 64, bgcolor: transparent"]$25.31
[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="width: 101, bgcolor: #FCA2F1"]345545WM-5C
[/TD]
[TD="width: 64, bgcolor: transparent"]CURT
[/TD]
[TD="width: 64, bgcolor: transparent, align: right"]123585
[/TD]
[TD="width: 64, bgcolor: transparent"]$25.31
[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="width: 101, bgcolor: #FCA2F1"]345545WM-5C
[/TD]
[TD="width: 64, bgcolor: transparent"]BUYERS
[/TD]
[TD="width: 64, bgcolor: transparent, align: right"]125223
[/TD]
[TD="width: 64, bgcolor: yellow"]$25.31
[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="width: 101, bgcolor: black"]ITEM NUMBER
[/TD]
[TD="width: 64, bgcolor: black"]VENDOR
[/TD]
[TD="width: 64, bgcolor: black"]VENDOR NUMBER
[/TD]
[TD="width: 64, bgcolor: black"]COST
[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="width: 101, bgcolor: transparent"]8375545W-2B
[/TD]
[TD="width: 64, bgcolor: transparent"]CURT
[/TD]
[TD="width: 64, bgcolor: transparent, align: right"]123456
[/TD]
[TD="width: 64, bgcolor: transparent"]$10.25
[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, colspan: 2"]INDEX / MATCH
[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="width: 101, bgcolor: transparent"]345545SM-5C
[/TD]
[TD="width: 64, bgcolor: transparent"]BUYERS
[/TD]
[TD="width: 64, bgcolor: transparent, align: right"]123654
[/TD]
[TD="width: 64, bgcolor: transparent"]$25.31
[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="width: 101, bgcolor: #FCA2F1"]345545WM-5C
[/TD]
[TD="width: 64, bgcolor: transparent"]CURT
[/TD]
[TD="width: 64, bgcolor: transparent, align: right"]123585
[/TD]
[TD="width: 64, bgcolor: transparent"]$25.31
[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="width: 101, bgcolor: #FCA2F1"]345545WM-5C
[/TD]
[TD="width: 64, bgcolor: transparent"]BUYERS
[/TD]
[TD="width: 64, bgcolor: transparent, align: right"]125223
[/TD]
[TD="width: 64, bgcolor: yellow"]$25.31
[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: yellow, colspan: 12"]Notice the difference between a one dimensional (whether INDEX / MATCH OR VLOOKUP) lookup and a multiple dimensional lookup?
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="width: 101, bgcolor: black"]ITEM NUMBER
[/TD]
[TD="width: 64, bgcolor: black"]VENDOR
[/TD]
[TD="width: 64, bgcolor: black"]VENDOR NUMBER
[/TD]
[TD="width: 64, bgcolor: black"]COST
[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="width: 101, bgcolor: transparent"]8375545W-2B
[/TD]
[TD="width: 64, bgcolor: transparent"]CURT
[/TD]
[TD="width: 64, bgcolor: transparent, align: right"]123456
[/TD]
[TD="width: 64, bgcolor: transparent"]$10.25
[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, colspan: 5"]INDEX / MATCH BASED ON MULTIPE CRITERIA
[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="width: 101, bgcolor: transparent"]345545SM-5C
[/TD]
[TD="width: 64, bgcolor: transparent"]BUYERS
[/TD]
[TD="width: 64, bgcolor: transparent, align: right"]123654
[/TD]
[TD="width: 64, bgcolor: transparent"]$25.31
[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="width: 101, bgcolor: #FCA2F1"]345545WM-5C
[/TD]
[TD="width: 64, bgcolor: transparent"]CURT
[/TD]
[TD="width: 64, bgcolor: transparent, align: right"]123585
[/TD]
[TD="width: 64, bgcolor: transparent"]$25.31
[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="width: 101, bgcolor: #FCA2F1"]345545WM-5C
[/TD]
[TD="width: 64, bgcolor: transparent"]BUYERS
[/TD]
[TD="width: 64, bgcolor: transparent, align: right"]125223
[/TD]
[TD="width: 64, bgcolor: yellow"]$20.89
[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="width: 101, bgcolor: black"]ITEM NUMBER
[/TD]
[TD="width: 64, bgcolor: black"]VENDOR
[/TD]
[TD="width: 64, bgcolor: black"]VENDOR NUMBER
[/TD]
[TD="width: 64, bgcolor: black"]COST
[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="width: 101, bgcolor: transparent"]8375545W-2B
[/TD]
[TD="width: 64, bgcolor: transparent"]CURT
[/TD]
[TD="width: 64, bgcolor: transparent, align: right"]123456
[/TD]
[TD="width: 64, bgcolor: transparent"]$10.25
[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, colspan: 5"]INDEX / MATCH BASED ON MULTIPE CRITERIA
[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="width: 101, bgcolor: transparent"]345545SM-5C
[/TD]
[TD="width: 64, bgcolor: transparent"]BUYERS
[/TD]
[TD="width: 64, bgcolor: transparent, align: right"]123654
[/TD]
[TD="width: 64, bgcolor: transparent"]$25.31
[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="width: 101, bgcolor: #FCA2F1"]345545WM-5C
[/TD]
[TD="width: 64, bgcolor: transparent"]CURT
[/TD]
[TD="width: 64, bgcolor: transparent, align: right"]123585
[/TD]
[TD="width: 64, bgcolor: transparent"]$25.31
[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="width: 101, bgcolor: #FCA2F1"]345545WM-5C
[/TD]
[TD="width: 64, bgcolor: transparent"]BUYERS
[/TD]
[TD="width: 64, bgcolor: transparent, align: right"]125223
[/TD]
[TD="width: 64, bgcolor: yellow"]$20.89
[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
=INDEX(TAB2!$A$1:$D$7,MATCH(A2,TAB2!$A$1:$A$7,0),4)and hit enter.

Nothing happened, right? Well, you got an error. It is because the INDEX / MATCH is what is called an ARRAY FORMULA, or some call it a CSE FORMULA.

Wrong! The formula works - it's a regular formula not an array formula (no need of CSE)


=INDEX(TAB2!$A$1:$D$7,MATCH(A2,TAB2!$A$1:$A$7,0),4)and hit enter.The INDEX formula remains as it was looking at the entire “ARRAY” or tab that you want to find somethingin, but the ARRAY in the MATCH is only looking in the column that you want to find the lookup value (item number).I know my item number is in column A of Tab2, so I have it look at TAB2!$A$1:$A$7.If my item number was in column B, then I would simply change my match array to TAB2!$B$1:$B$7, even if my index was still A:D. You would change the lookup column of 4 to 3 because if your look value is in column B, you’re now starting your lookup in column B so you want column 3 returned rather than 4, right?


Wrong! Using INDEX/MATCH you should keep the last parameter = 4 because you want the value in 4th column of the range A1:D7

On the other hand, using VLOOKUP(A2,TAB2!B1:D7,3,0) you should adjust the third parameter to 3.

M.




 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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