Using Vlookup with Offset

howard

Well-known Member
Joined
Jun 26, 2006
Messages
6,561
Office Version
  1. 2021
Platform
  1. Windows
I have a table with data and need to calculate the commission payable based on the units achieved.


If for example a person achieves unit sales of say 615, the calculation should be =(615/700)*1000 -see sample data below


I need formula that if the unit sales is higher than the amount looked up in the table, it will take the unit sales below the number looked up and divide this by the unit sales in the next row in the table and multiply this by the value in the second column in the table


I my sample 615 was the unit sales achieved , amount in the table is 600, so the next highest unit is 700 and the value applicable is 1000, so formula is 615/700 x 1000


I would possible need a Vlookup with an offset function, but cannot get it to work


It would be appreciated if someone could assist me


Book1
AB
10500
2600800
37001000
48001500
59006000
6
7
8
9
10achievement615
11
12Vlookup800
13
14
15Calcl should Be878.57
16
17Using Vlookup with Offset
18
19
20
Sheet1
Cell Formulas
RangeFormula
B12=VLOOKUP(B10,A1:B5,2,TRUE)
B15=B10/A3*B3
 
Last edited:

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Maybe,

B12, enter :

=B10/AGGREGATE(14,6,A1:A5/B1:B5/(A1:A5>=B10),1)

Regards
Bosco
 
Upvote 0
Thanks for the help Bosco . Your formula works perfectly Please explain how the aggregate formula works and what aggregate(14,6 means
 
Upvote 0
Howard, it looks like you've found your solution in Bosco's formula. Here's another (for those who may have an older version of Excel):

Code:
=B10/INDEX(A1:A5,MATCH(B10,A1:A5,1)+1)*INDEX(B1:B5,MATCH(B10,A1:A5,1)+1)

However, given your setup, I don't see when any value in B10 would wind up being multiplied by the value in B1 (i.e., 500). It leaves me wondering why there is a value in B1 at all.
 
Upvote 0
Thanks for the help Bosco . Your formula works perfectly Please explain how the aggregate formula works and what aggregate(14,6 means

AGGREGATE(14,6,……….

AGGREGATE with function_num 14 >> LARGE function

and, options 6 >> Ignore error values

Further detail please press F1 in checking with Excel helper file.

Regards
Bosco
 
Upvote 0
Thanks for the help. You are 100% correct that there is no need for a value in B1
 
Upvote 0

Forum statistics

Threads
1,214,386
Messages
6,119,215
Members
448,874
Latest member
b1step2far

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