Match Index for multiple grids/products

helplise

New Member
Joined
Jul 30, 2020
Messages
10
Office Version
  1. 365
Platform
  1. Windows
Hi all. I need to look up a value from a grid based on width (column headers) and height (row headers). I have worked out how to use the match and index formulas to do it. It's to look up pricing but I have around 50 product codes each with their own pricing grid. I'm unsure how to direct it to the correct grid based on product code. As a workaround, I have the value returned for each of the 50 and do a Hlookup to return the value for the correct product code. Can anyone tell me how to do it more efficiently? Thanks so much!
 

Attachments

  • Excel query.PNG
    Excel query.PNG
    7.4 KB · Views: 20
I've just thought of a potential fail point for my suggestion above :oops:

It will not find the correct result if, for example, you search for PS1 890 x 650 and PS1 is only listed for 1100 x 700 or 1000 x 800, but not 1000 x 700 (closest match for both dimensions).
If each item will always have all possible width / height combinations listed then it should be fine.

Also, SUMIFS will total up any erroneous duplicates in the list so that might need to be allowed for?
 
Upvote 0

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
I also have a separate worksheet that they all feed over to.
All pricing grids (50+) can be made to the exact same size if need be.
Let's do those two things. In my example I have allowed 10 rows and 5 columns for each grid but you can make that whatever size you need/want so long as they are uniform.
An extra requirement is to put a zero in cells A2, A12 & A22. In your sample you had the text "mm" in that position. If you still want to see that you can put the zero in the cell but custom format the cell as "mm"
I have done that in A22 to demonstrate - the actual value in the cell is still 0.

helplise 2020-08-04 1.xlsm
ABCDE
1PS1
206007008002000
3100014710
4110025811
5120036912
6
7
8
9
10
11PRMI
1206007008002000
13100013161922
14110014172023
15120015182124
16
17
18
19
20
21ABCD
22mm500500010000
23500536
2410006200078
2515008554
26
27
28
29
30
Price Grids



Now on the Lookup sheet I have used 3 helper columns (to keep all the formulas a bit simpler). Once populated with their formulas, these helper columns could be hidden.
If you have more grids and/or different sizes, you will need to adjust all the formulas. Value, Help Start and Help Width should be straight-forward enough. In Help Height, the 8 at the end of my formula needs to be 2 less than the number of rows for each grid.

helplise 2020-08-04 1.xlsm
CDEFGHI
1WidthHeightProductValueHelp StartHelp WidthHelp Height
218001200PS112253
32400600ABCD20002232
45001150PS13223
520001200PRMI241253
Lookup
Cell Formulas
RangeFormula
F2:F5F2=INDEX('Price Grids'!A$1:E$30,G2+I2,H2)
G2:G5G2=MATCH(E2,'Price Grids'!A$1:A$30,0)+1
H2:H5H2=MATCH(C2-0.0001,INDEX('Price Grids'!A$1:E$30,G2,0))+1
I2:I5I2=MATCH(D2-0.0001,INDEX('Price Grids'!A$1:A$30,G2):INDEX('Price Grids'!A$1:A$30,G2+8))
 
Upvote 0
Thanks Jason. I'll have a play around. Do you know much about the new xlookup? Can you lookup the table to return from the 4th column if the first, second and the third all match to 3 x search criteria? I can do a table to look up the next increment so we can do exact match. ?? Thanks again
 
Upvote 0
Do you know much about the new xlookup?
I tried to use XLOOKUP for your problem but anything that I tried ended up more complex than the standard INDEX/MATCH formulas I ended up suggesting in post 12.
 
Upvote 0
Thank you Peter and Jason. I hadn't actually seen post 12 when I replied last time. Not sure how that happened. I'll try as above. Thanks so much.
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,483
Members
448,967
Latest member
visheshkotha

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