Lookup on every other column

joand

Active Member
Joined
Sep 18, 2003
Messages
266
I want to get the specific rate for an amount that falls within the range. See example below. Any ideas?

Book1
ABCDEFGHIJKLMN
1DateAmountRateAmountRateAmountRateAmountRateAmountRate
2Amount25004/01/20211006%20013%30020%40030%50050%
3Date04/01/202304/01/20221007%20015%30025%40035%50055%
4Rate20%04/01/20231008%20020%30030%40040%50060%
5
6
Sheet1
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Thanks for using the xl2bb add in! But, we also need to know your excel version. Can you update your profile show it shows up on your thread button?
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
this will solve it for the scenario posted, i think. But, am unsure if you have a larger scope:

Mr excel questions 35.xlsm
ABCDEFGHIJKLMN
1DateAmountRateAmountRateAmountRateAmountRateAmountRate
2Amount2502021-04-011006%20013%30020%40030%50050%
3Date2023-04-012022-04-011007%20015%30025%40035%50055%
4Rate20%2023-04-011008%20020%30030%40040%50060%
joand
Cell Formulas
RangeFormula
B4B4=INDEX($D$2:$N$4,MATCH(YEAR(B3),YEAR($D$2:$D$4),0),MATCH(ROUNDDOWN(B2,-2),$D$4:$N$4,0)+1)
 
Upvote 0
Here is another way to do the column number locating. Again, if your scenario is different for each row then it won't work:

Excel Formula:
=INDEX($D$2:$N$4,MATCH(YEAR(B3),YEAR($D$2:$D$4),0),2*MATCH(ROUNDDOWN(B2,-2),{100,200,300,400,500},0)+1)
 
Upvote 0
Yup, you're right, once I changed the amounts, it is giving me #N/A error. For example i changed G4 from 200 to 250, the result should have been 20%, instead it is #N/A

Sample.xlsx
ABCDEFGHIJKLMN
1DateAmountRateAmountRateAmountRateAmountRateAmountRate
2Amount25004/01/20211006%20013%30020%40030%50050%
3Date04/01/202304/01/20221007%20015%30025%40035%50055%
4Rate#N/A04/01/20231008%25020%30030%35040%60060%
Sheet1
Cell Formulas
RangeFormula
B4B4=INDEX($D$2:$N$4,MATCH(YEAR(B3),YEAR($D$2:$D$4),0),MATCH(ROUNDDOWN(B2,-2),$D$4:$N$4,0)+1)
 
Upvote 0
As previously requested. Can you please update your profile to show which version of Excel you are using.
 
Upvote 0
Try this:

varios 12may2023.xlsm
ABCDEFGHIJKLMN
1DateAmountRateAmountRateAmountRateAmountRateAmountRate
2Amount25001/04/20211006%20013%30020%40030%50050%
3Date01/04/202301/04/20221007%20015%30025%40035%50055%
4Rate20%01/04/20231008%20020%30030%40040%50060%
Hoja7
Cell Formulas
RangeFormula
B4B4=IF(B2<100,0,INDEX(E2:N4,MATCH(B3,D2:D4,0),MAX(IF(MOD(E2:N2,2)=0,IF(E2:N2<B2+0.001,COLUMN(E2:N2))))-3))
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
If you have 365 or 2021 try
Excel Formula:
=LET(f,FILTER(E2:N4,YEAR(D2:D4)=YEAR(B3)),INDEX(f,XMATCH(B2,f,-1)+1))
 
Upvote 0
Solution

Forum statistics

Threads
1,214,985
Messages
6,122,606
Members
449,089
Latest member
Motoracer88

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