VLOOKUP with ranges

ORoxo

Board Regular
Joined
Oct 30, 2016
Messages
149
Hey, guys,
I'm aware its possible to use vlookup to search in a range. However, let's say you only have the maximum limit. For the purpose of example a have column A with amount and column B with percentage.
Column A figures represent salaries:

AB
6320%
6453%
6835,7%
7367,5%

<tbody>
</tbody>

How does this work? Basically, if someone gets a salary UNTIL 736, it will pay 7,5%. In other words, 736 is the upper limit of the range.

If I use vlookup with TRUE as last statement, it will interpret 736 as the lower limit and, therefore, for a salary of 730, for instance, will return 5,7% when it should return 7,5%.

How can I solve this?

Thanks!
 
Last edited:

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Hi,

Try this : Ctrl+Shift+Enter NOT just Enter

E2 =INDEX(B2:B5,MATCH(1,IF(D2 > A2:A5,D2 < A2:A5,1),0))<a2:a5,1),0))


ABCDE
1salarypercentagesalarypercentage
263207307,5%
36450.03
46835,7%
57367,5%

<tbody>
</tbody>

</a2:a5,1),0))
 
Last edited:
Upvote 0
Try...

=INDEX($B$1:$B$4,MATCH(E1,$A$1:$A$4,1)+(LOOKUP(E1,$A$1:$A$4) < E1))

where E1 = 736.

This assumes that the data of A:B is sorted in ascending order on A.
 
Upvote 0
Try resorting your data in range A1:B4 in descending order by column A and using the following formula:

=LOOKUP(1/E1,1/A1:A4,B1:B4)
 
Upvote 0

Forum statistics

Threads
1,216,111
Messages
6,128,898
Members
449,477
Latest member
panjongshing

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