Indexing price tables

Blind_Man

New Member
Joined
May 20, 2022
Messages
2
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
Hi,
I'm having some trouble trying to pick the correct cell on a price table.
The price tables are for window coverings (blinds etc) and the price I need to select is based on a row of widths and a column of heights.
I've tried using INDEX,MATCH,MATCH and VLOOKUP but can't get it to select the correct option. so hopefully someone can help!

So in this example if I enter the width as 900 (at A3), and the height as 1550 (at B3), I need it to return 102 (at C3)

EXCELcapture.JPG


I can get it to kind of work, but it either selects the value lower than what I need, or the highest value in the table, depending on whether I have 1 or -1 in the MATCH function.

What would be the best way to achieve this?

Thanks!
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
IGNORE DOES NOT WORK CORRECTLY - when value matches

try
=INDEX(G3:K7,MATCH(B3,F3:F7)+1,MATCH(A3,G2:K2)+1)

works on an example i already have

Grid lookup Nearest value.xlsx
ABCDEFGHIJKLMN
1
220005000100001500020000250003000040000
35400170.18580.30.2350.170.140.120.110.10.9
4120.3050.240.1750.1450.1250.1150.1050.95
5160.310.2450.180.150.130.120.110.1
6200.3150.250.1850.1550.1350.1250.1150.105
7
Sheet3
Cell Formulas
RangeFormula
D3D3=INDEX(G3:K7,MATCH(B3,F3:F7)+1,MATCH(A3,G2:K2)+1)


Note: Images are difficult to see , and also requires that I input all the data myself, which is very time consuming.

A SMALL sample spreadsheet, around 10-20 rows, would help a lot here, with all sensitive data removed, and expected results mocked up and manually entered, with a few notes of explanation.

MrExcel has a tool called “XL2BB” that lets you post samples of your data and will allow us to copy/paste your sample data into our Excel spreadsheets, saving a lot of time.

You can also test to see if it works ok, in the "Test Here" forum.

OR if you cannot get XL2BB to work, or have restrictions on your PC , then put the sample spreadsheet onto a share
I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
 
Upvote 0
At the end of match formula, we can select less than, equal or greater than. Since greater than requires the data to be sorted descending, I used less than+1. Hope it helps
 

Attachments

  • Capture.PNG
    Capture.PNG
    12.1 KB · Views: 6
Upvote 0
try
=INDEX(G3:N6,MATCH(MIN(IF(F3:F6>=B3,F3:F6)),F3:F6,1),MATCH(MIN(IF(G2:N2>=A3,G2:N2)),G2:N2,1))

see various examples in row D3 to D6

Grid lookup Nearest value.xlsx
ABCDEFGHIJK
1
2650850105012501450
390015500.18510000.30.2350.170.140.12
485015500.2512000.3050.240.1750.1450.125
5125012000.14514000.310.2450.180.150.13
6137512500.1316000.3150.250.1850.1550.135
718000.320.2550.190.160.14
Sheet3
Cell Formulas
RangeFormula
D3D3=INDEX(G3:N6,MATCH(MIN(IF(F3:F6>=B3,F3:F6)),F3:F6,1),MATCH(MIN(IF(G2:N2>=A3,G2:N2)),G2:N2,1))
D4D4=INDEX(G3:K7,MATCH(MIN(IF(F3:F7>=B4,F3:F7)),F3:F7,1),MATCH(MIN(IF(G2:K2>=A4,G2:K2)),G2:K2,1))
D5D5=INDEX(G3:K7,MATCH(MIN(IF(F3:F7>=B5,F3:F7)),F3:F7,1),MATCH(MIN(IF(G2:K2>=A5,G2:K2)),G2:K2,1))
D6D6=INDEX(G3:K7,MATCH(MIN(IF(F3:F7>=B6,F3:F7)),F3:F7,1),MATCH(MIN(IF(G2:K2>=A6,G2:K2)),G2:K2,1))
 
Upvote 0
Thanks so much for the replies! It works perfectly now.
I knew it was referencing the next lowest size to what I wanted, but couldn't think of how to get it to choose the next one up. These solutions did that.

Thanks again!
 
Upvote 0

Forum statistics

Threads
1,215,053
Messages
6,122,882
Members
449,097
Latest member
dbomb1414

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