Look for value based on multiple ranges

MagsinoAS

New Member
Joined
Sep 28, 2011
Messages
20
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Anyone can help me with this, I need to get a result based on ranges. The column criteria would be range of weights while the row is range based on postal codes. Please see the screenshot below:

lookup.png
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
You could try this array formula
Code:
=INDEX($B$2:$D$4,
MATCH(1,(A9>=--LEFT($A$2:$A$4,FIND("-",$A$2:$A$4)-1))*(A9<=--MID($A$2:$A$4,FIND("-",$A$2:$A$4)+1,99)),0),
MATCH(1,(B9>=--LEFT($B$1:$E$1,FIND("-",$B$1:$E$1)-1))*(B9<=--SUBSTITUTE(MID($B$1:$E$1,FIND("-",$B$1:$E$1)+1,99),"kg","")),0))
 
Last edited:
Upvote 0
If you could change your lookup table similar to below then you could try this:


Excel 2013
ABCDE
10.0000.5011.0102.010
220005.666.277.278
322357.318.319.3110
430005.876.457.349
5
6
7
820000.606.27
930012.007.34
1029980.507.31
Sheet1
Cell Formulas
RangeFormula
C8=INDEX($B$2:$E$4,MATCH($A8,$A$2:$A$4),MATCH($B8,$B$1:$E$1))
 
Upvote 0
It works if the weight is 0.501+, I'm getting error if I enter a weight between 0 to 0.5KG.

Thanks =)
 
Upvote 0
Follow OP's 1st level setup,

B8 formula, copy down :

=LOOKUP(A8,--LEFT(A$2:A$4,FIND("-",A$2:A$4)-1),INDEX(B$2:E$4,0,MATCH(B8,INDEX(--LEFT(B$1:E$1,FIND("-",B$1:E$1)-1),0))))

Edit : The OP's table in E1 is mistake, should read as : "2.01-3kg"

Regards
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,147
Messages
6,123,297
Members
449,095
Latest member
Chestertim

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