look up with from and to ranges

ExcelNewbie2020

Active Member
Joined
Dec 3, 2020
Messages
293
Office Version
  1. 365
Platform
  1. Windows
Sirs,

how to look up a value if the criteria is within the amount range?

based on the table, i need to look up the rate based on "NO." and the "FROM and TO" range. with my example, i'm looking for NO. 3 with an amount of 450000.. since the amount is within the range of 445000 and 477000 so i should have the RATE of 3.1..

Book5
ABCDEFGHIJKLMN
1FROMTOFROMTOFROMTOFROMTOFROMTOFROMTO
2RATE001122334455NO.
32.1334000363000365000394000393000420000417000445000444000470000472000496000AMOUNT
43.1363000395000394000422000420000450000445000477000470000503000496000525000
54.1395000426000422000455000450000484000477000510000503000534000525000557000
65.1426000520000455000520000484000520000510000544000534000570000557000597000
76.1520000601000520000617000520000632000544000647000570000662000597000677000
8
9
10NO.3INPUT
11AMOUNT450000INPUT
12RATE3.1FORMULA HERE
Sheet4
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Hi,
For cell D12, you can test following formula:
Excel Formula:
=INDIRECT("A"&MATCH(D11,INDIRECT(ADDRESS(1,MATCH(D10,$2:$2,0),4)&":"&ADDRESS(7,MATCH(D10,$2:$2,0),4)),1))
 
Upvote 0
Excel Formula:
=MAX(((IF((B1:M1="from")*(B2:M2=D10),B3:M7,0)<=D11)*(IF((C1:N1="to")*(C2:N2=D10),C3:N7,0)>=D11))*A3:A7)
 
Upvote 0
Hi,
For cell D12, you can test following formula:
Excel Formula:
=INDIRECT("A"&MATCH(D11,INDIRECT(ADDRESS(1,MATCH(D10,$2:$2,0),4)&":"&ADDRESS(7,MATCH(D10,$2:$2,0),4)),1))
result is "RATE"..
1680455478933.png
 
Upvote 0
How about
Excel Formula:
=INDEX(A3:A7,XMATCH(D11,CHOOSECOLS(--B3:M7,XMATCH(D10,B2:M2,0)),-1))
 
Upvote 0
Solution
Sorry ...but ... at my end ...formula produces 3.1 ...;)
 
Upvote 0
How about
Excel Formula:
=INDEX(A3:A7,MATCH(D11,INDEX(--B3:M7,,MATCH(D10,B2:M2,0)),1))
 
Upvote 1

Forum statistics

Threads
1,215,193
Messages
6,123,560
Members
449,108
Latest member
rache47

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