INDEX & MATCH with INDIRECT Function

IDRIS86

Board Regular
Joined
Mar 18, 2021
Messages
82
Office Version
  1. 365
Platform
  1. Windows
Hi I tried to match the argument in the below formula to -1 to pull the higher values than the look up value. But its not working. Only with Match argument 0 & 1 works. But I need to pick value higher than my reference. Could you assist.

Below the function,

=INDEX(INDIRECT(Table10[@MODEL]&"A"),MATCH(BC28,INDIRECT(Table10[@MODEL]&"H"),0),MATCH(BB28,INDIRECT(Table10[@MODEL]&"W"),0))
 
Send me a screenshot of your name manager, make sure I can see the full RefersTo content.

My results:

20210320 Index Match Multiple Tables.xlsx
ABCDEFGH
1
2
3S. NOWIDTH (MM)HEIGHT (MM)SLEEVESLEEVE TYPESLEEVE
41420212 YES 24 IN 16 GA 60.5
51420212 YES 24 IN 16 GA 60.5
6
INPUT
Cell Formulas
RangeFormula
G4:G5G4=IF(TRIM(E4)="YES",INDEX(INDIRECT($E$3&"A"),XMATCH(D4,INDIRECT($E$3&"H"),1 ),XMATCH(C4,INDIRECT($E$3&"W"),1 )),0)
 
Upvote 0

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Hi, I attached. Please check.
 

Attachments

  • Name manager.PNG
    Name manager.PNG
    71.9 KB · Views: 7
Upvote 0
Your SLEEVEW starts at $F$14 it needs to start at $E$14.
Great!. It works! Thank you.

But I don't know why the earlier table works with my same type of formula. Please check the below, it picks the correct value I needed. Also I attached its name manager screenshot.

Work sheet.xlsx
BCDEF
4WIDTH (MM)HEIGHT (MM)TYPEMODELValue
5458509 FD IBD2 131
Work sheet
Cell Formulas
RangeFormula
F5F5=INDEX(INDIRECT(Table10[@MODEL]&"A"),XMATCH(C5,INDIRECT(Table10[@MODEL]&"H"),1),XMATCH(B5,INDIRECT(Table10[@MODEL]&"W"),1))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
D5Cell Value=0textNO
E5Cell Value=0textNO
D5Cell Value=0textNO
E5Cell Value=0textNO
F5Cell Value=0textNO
Cells with Data Validation
CellAllowCriteria
D5List=TYPE
E5List=INDIRECT(D5)




Work sheet.xlsx
EFGHIJKLMNOPQRSTU
10SIZE1021522032543053564064575085596106602900295030003048
11102535962666972758285899298420420420420
12152565962667275798285929598433433433433
1320359626672757985899298102105459459459459
1425459666972758285899598105108473473473473
153056269727982899295102108112115512512512512
1635666727582859295102108112118125538538538538
17406697579859295102108112118125131564564564564
184577279859295102108115118128131138604604604604
1950875828995102108115121128135141148643643643643
2055979859298105112118125131141148154669669669669
21610828995102108115121128135144151158683683683683
22660859298105112121128135141151158164722722722722
237118995102112118125135141148158164174761761761761
247629298105115121131138148154164171180788788788788
2581395102112118128135144151161171180187827827827827
2686495105115121131141148158167177187194853853853853
2791498108118128135144154164174184194200879879879879
289501511641771902032172302432562692822951286128612861286
2910001511641771902032172302432562692822951286128612861286
3010501581711841972102232362492632822953081339133913391339
3111001581711841972102232362492632822953081339133913391339
3211501641771902032172302432562692893023151365136513651365
3312001641771902032172302432562692893023151365136513651365
3412501711841972102232432562692823023153281444144414441444
3513001711841972102232432562692823023153281444144414441444
3613501771902032232362492692822953153283481523152315231523
3714001771902032232362492692822953153283481523152315231523
3814501841972102302432632762953083283413611575157515751575
3915001841972102302432632762953083283413611575157515751575
4015501902032232362562692893023223413613741654165416541654
4116001902032232362562692893023223413613741654165416541654
4216501902102302432632822953153353543743871706170617061706
4317001902102302432632822953153353543743871706170617061706
4417501972172362562692893083283483683874001759175917591759
4518001972172362562692893083283483683874001759175917591759
4618292462662853053253453643844044334534732048204820482048
Table
Cells with Conditional Formatting
CellConditionCell FormatStop If True
F11:U46Cell Value=0textNO
 

Attachments

  • Name manager 2.PNG
    Name manager 2.PNG
    74.5 KB · Views: 5
Upvote 0
The range names you have done for the Model (Work Sheet) are fine, its just that its the harder method, which is attested to by the fact that you didn't get it quite right when you tried to do it for the Sleeve (Input) work sheet.

I've tried to show a comparison of the 2 methods below, not sure how successfully.

1616409185264.png


So looking at the way you did it for the sleeve version.
W is determining the Columns for A so the columns have to line up.
H is determining the Rows for A so the Rows have to line up

1616410130487.png
 
Upvote 0
The range names you have done for the Model (Work Sheet) are fine, its just that its the harder method, which is attested to by the fact that you didn't get it quite right when you tried to do it for the Sleeve (Input) work sheet.

I've tried to show a comparison of the 2 methods below, not sure how successfully.

View attachment 34985

So looking at the way you did it for the sleeve version.
W is determining the Columns for A so the columns have to line up.
H is determining the Rows for A so the Rows have to line up

View attachment 34986
I understood the difference between 2 with your good pictorial presentation. I referred this formula in youtube and applied the same not to have any errors. For IBD2, it works well and when I applied the same for SLEEVE, it becomes incorrect. Not sure why it happens. In your last table I understand differences. But may I know what is MATCH under column and Row you specified.

Also can you explain what this means
W is determining the Columns for A so the columns have to line up.
H is determining the Rows for A so the Rows have to line up


Thanks a lot for your support & time.
 
Upvote 0
The pictures, the column / row match & the text are 3 different ways of saying the same thing. If one works for you just ignore the other 2.

IBD2W is the heading row. You are using a match on that to find the column. If it finds a column and for example its column 3, then if IBD2W starts at F then what you want is F + 3 columns = H.
BUT its not adding the 3 to where IBD2W start its applying it to the IBD2A range. So IBD2A needs to start at the same Column in this case Column F so that F + 3 columns = H.
If the IBD2A range has a different starting point say E then E +3 Columns = G but you needed H.
If my count looks wrong its because the + 3 is not strictly correct, its an index no, so F would be 1, G would be 2, H would be 3.

The same holds true for Rows IBD2H after a match will return a number, this number is based on where the range starts. If when you apply it to IBD2A it starts on a different row, then when you use the number your match returned and apply it to a different starting point, you will be at a different row to the intended one.

I might have confused you further. That's why I think its much easier to use the top left corner for all the references then you know that they all start at the same place and that the column and row counters are all going to line up.
 
Upvote 0
Solution

Forum statistics

Threads
1,214,429
Messages
6,119,428
Members
448,896
Latest member
MadMarty

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