Complex (for me) Index + Match Problem

George__

New Member
Joined
Mar 14, 2019
Messages
8
Good morning,

I'm trying to figure out a formula for this

  1. Look horizontally for the unique header value (A B C D E F G)
  2. Then vertically search column by column for the part # (it's always column 0)
  3. Give value for stock (always column 2)


Sheet 1
Part # Stock
390-2 | function
219-2 |
210-3 |

Sheet 2

unique value | space | unique value
part # | stock | space | part # | stock


Any insight?

Thanks
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Hello,

Your three steps are :

1. =match("A",A1:Z1,0) to get ColNb
2. =match(12,A:A,0) to get RowNb
3. then you can use Index
=Index(yourRange, RowNb,ColNb)

Hope this will help
 
Upvote 0
Hello,

Your three steps are :

1. =match("A",A1:Z1,0) to get ColNb
2. =match(12,A:A,0) to get RowNb
3. then you can use Index
=Index(yourRange, RowNb,ColNb)

Hope this will help

12
PartUsed inPartUsed in
G58BY-3904-A3212
58BC-3904-B3258
PartUsed InWarehouse
G58BY-3 (formula)1
58Bformula 1
904-Aformula 2
904-Bformula 2

<tbody>
</tbody>

Warehouse is entered by hand but I am trying to create a SUMPRODUCT formula to grab it based on the part #

=INDIRECT(ADDRESS(SUMPRODUCT(($A$1:$F$6=A10)*ROW($A$1:$A$6))-2,(SUMPRODUCT(($A$3:$F$6=A10)*COLUMN($A$1:$F$1))+1)))

I need to change the ROW -2 and COLUMN +1 when I drag it down

Formula for part #
=INDEX($A$3:$N$6,MATCH(C9,$A$1:$Z$1,0),MATCH(A9,$A:$A,0))


How do I make excel figure this out?
 
Upvote 0
I think I figured out the Index one
=INDEX($B$2:$E$4,SMALL(IF(INDEX($A$2:$E$4,,MATCH(C9,$A$1:$E$1,0))<>"",IF($A$2:$A$4=A9,ROW($A$2:$E$4)-ROW($A$2)+1)),1),MATCH(C9,$B$1:$E$1,0))
 
Upvote 0
Hello again,

Think you should solve one problem after the other ...

Regarding the Formula for Part #, it should read as follows

=INDEX($A$1:$N$6,MATCH(C9,$A$1:$N$1,0),MATCH(A9,$A1:$A6,0))

HTH
 
Upvote 0
Hello again,

Think you should solve one problem after the other ...

Regarding the Formula for Part #, it should read as follows

=INDEX($A$1:$N$6,MATCH(C9,$A$1:$N$1,0),MATCH(A9,$A1:$A6,0))

HTH

Thank you

IS what I'm trying to do called Matrix Searching?

I can grab data perfectly from the first table but if I enter data to look in table 2 I get errors -_-"
 
Upvote 0
Maybe something like this.
Formula in C9 is an array formula and must be entered with CTRL-SHIFT-ENTER.
Drag formulas down as needed.
Excel Workbook
ABCDE
112
2PartUsed inPartUsed in
3G58BY-3904-A3212
458BC-3904-B3258
5
6
7
8PartUsed InWarehouse
9G58BY-31
1058BC-31
11904-A32122
12904-B32582
Sheet
 
Upvote 0

Forum statistics

Threads
1,215,865
Messages
6,127,400
Members
449,382
Latest member
DonnaRisso

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