look for number between 2 rows - return number from adjacent column

Vcoppens

Board Regular
Joined
Apr 16, 2012
Messages
90
HI,
I think the solution might be easy but I am stuck.

My data is in column A10 + B10 & A12 + B12.

There is a whole series of amounts in column A.
In column B is the amount when single.
In column C is the amount when not single.

I am looking to find B10 (1,945) in column A.
Obviously, that won't be an exact match.
Therefore, I am looking for the amount between 2 rows.
It needs to return the amount in column B when single or column C when not single.
And it needs to be the amount in the row that is less or equal to 1,945 but higher than the amount in the row above.
1950 (cell A 5) is less or equal than 1945;
1935 (cell A 4) is higher than 1945
Therefore, I need the amount 307.13 in column B5.

Hopefully someone is able to set me up the right path.

Thank you very much in advance.

1​
ABC
2​
SingleNot single
3​
1,920.00
294.29​
51.71​
4​
1,935.00
300.71​
55.73
5​
1,950.00
307.13
59.74​
6​
1,965.00
313.55​
63.75​
7​
1,980.00
319.97​
68.27​
8
9Looking for the following result
10Single1,945.00needs to return 307.13
11
12Not single1,934.00needs to return 55.73
lookup 1,945.00in column A
if less or equal than amount found in A5 but more than amount in A4 then return amount in cell b5 on condition that A10 = single​
lookup 1,934.00in column A
if less or equal than amount found in A4 but more than amount in A3then return amount in cell C4 on condittion that A12 = C3 [not single]
 

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.
Book1
ABCD
3SingleNot single
41,920.00294.2951.71
51,935.00300.7155.73
61,950.00307.1359.74
71,965.00313.5563.75
81,980.00319.9768.27
9
10Single1,945.00307.13
11
12Not Single1,934.0055.73
Sheet1
Cell Formulas
RangeFormula
D10D10=INDEX($B$4:$B$8,MATCH(MIN(IF($A$4:$A$8>=C10,$A$4:$A$8)),$A$4:$A$8,0))
D12D12=INDEX($C$4:$C$8,MATCH(MIN(IF($A$4:$A$8>=C12,$A$4:$A$8)),$A$4:$A$8,0))
 
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
If you have xl365 another option
Fluff.xlsm
ABCD
1SingleNot single
21920294.2951.71
31935300.7155.73
41950307.1359.74
51965313.5563.75
61980319.9768.27
7
8Single1945307.13
9Not Single193455.73
Main
Cell Formulas
RangeFormula
D8:D9D8=INDEX($B$2:$C$6,XMATCH(C8,$A$2:$A$6,1),MATCH(A8,$B$1:$C$1,0))
 
Upvote 0
Solution
Thank you so very much!
It worked exactly how I wanted it.

Thank you again.
Have a wonderful day/evening.
 
Upvote 0
Please update your details as requested above
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’)

Sounds like you have a recent version though so you could also consider this

22 10 28.xlsm
ABCD
1SingleNot single
21920294.2951.71
31935300.7155.73
41950307.1359.74
51965313.5563.75
61980319.9768.27
7
8Single1945307.13
9Not Single193455.73
XLOOKUP
Cell Formulas
RangeFormula
D8:D9D8=XLOOKUP(C8,A$2:A$6,IF(A8="Single",B$2:B$6,C$2:C$6),,1)
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,391
Messages
6,124,674
Members
449,179
Latest member
fcarfagna

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