Excel Vlookup question

nicostallion

New Member
Joined
Oct 6, 2011
Messages
2
Hi guys I have un problemo!!

im trying to devise a spreadsheet with vlookup basically to calculate the charges of processing someones payroll for them.

The price will depend on the number of employees the client will have.

These are the price listing rules i have been given.

number....... weekly charge.................. monthly charge
1-5........ .......£10.00 per run.....................£15.00 per run
6-10............. £20.00 per run.....................£30.00 per run
11-50....... ....add £1.50 per person .........add £2.00 per person
51-150...... ....add £1.25 per person .........add £1.75 per person
151-300..... ...add £1.00 per person ........add £1.50 per person
300+ ...........add £0.75 per person ........add £1.25 per person

my knowledge is quite basic so i have teied a few times and have managed to do Vlookup if it was based on the table 1-300 with individ price etc and also using quantity price breaks.

But the way my bosses have asked is a combination of both and im really struggling.

any help and advice on this would be greatly appreciated

many thanks

Nico
 
Hi,

could multiple If statement:

Weekly one =

=IF(A1<=5,10,IF(AND(A1>=6,A1<=10),20,IF(AND(A1>=11,A1<=50),1.5*A1,IF(AND(A1>=51,A1<=150),1.25*A1,IF(AND(A1>=151,A1<=300),1*A1,0.75*A1)))))

(apply same for monthly changing values)
 
Upvote 0
Welcome to the board!

Here's one more way (see the adjustment made in column A). The other part of the range is removed i.e. 1-5 --> 1, 6-10 --> 6. This way we can perform Range Lookup. See below:

Excel Workbook
ABCDE
1NumberWeekly ChargeMonthly ChargeNumber20
2110.00 per run15.00 per runWeekly Chargeadd 1.50 per person
3620.00 per run30.00 per runMonthly Chargeadd 2.00 per person
411add 1.50 per personadd 2.00 per person
551add 1.25 per personadd 1.75 per person
6151add 1.00 per personadd 1.50 per person
7300add 0.75 per personadd 1.25 per person
Sheet1
 
Upvote 0
:warning:

Hi again i think i wasnt so clear on my first post :confused::rolleyes:. the puropse of this is to then type in the nuimber of employees and a price be shown based on those rules above.

i was hoping to make it look like this using this example to show what is calculated


I have 55 employees paid monthly. The cost is £117.50 per run. (£30.00 plus 40 extra at £2.00 each plus 5 extra at £1.50 each).


<TABLE style="BORDER-COLLAPSE: collapse" border=0 cellSpacing=0 cellPadding=0 width=293 bgColor=#c7dbd1><TBODY><TR style="HEIGHT: 13pt"><TD class=ee106>Weekly paid employees </TD><TD class=ee109><INPUT style="WIDTH: 100%" id=pA2B class=ee111 tabIndex=1 value=0 name=pA2B> </TD><TD class=ee106></TD></TR><TR style="HEIGHT: 13pt"><TD class=ee106></TD><TD class=ee109></TD><TD class=ee106></TD></TR><TR style="HEIGHT: 13pt"><TD class=ee106>Monthly paid employees </TD><TD class=ee109><INPUT style="WIDTH: 100%" id=pA4B class=ee111 tabIndex=3 value=55 name=pA4B> </TD><TD class=ee106></TD></TR><TR style="HEIGHT: 14pt"><TD class=ee106>Your Payroll quote: </TD><TD class=ee112><INPUT style="BORDER-BOTTOM: #000000 0px solid; BORDER-LEFT: #000000 0px solid; WIDTH: 100%; OVERFLOW: hidden; BORDER-TOP: #000000 0px solid; BORDER-RIGHT: #000000 0px solid" id=pA5B class=ee111 tabIndex=-1 value=£27,12 readOnly name=pA5B> </TD><TD class=ee106>per week</TD></TR></TBODY></TABLE>
 
Upvote 0
Here's a working example based on your pricelist:
http://www.francomusso.com/vlookup-and-if-example

Vlookup with range = TRUE got me as far as finding the correct price bracket for each number of customers.

To allow for the add-on prices, I then had to combine this with an if statement to first consider whether the number was less than 11. Anything less than 11 was just lookep up, whereas anything above 11 was multipled by the relevant 'add-on' price + 20

I thought this apporach would be nice and flexible as you'll see if you change any of the weekly charges, monthly charges or Numbers - everything else will update with no changes tot he formulas required.

I've enabled editing on the speadsheet so you can see / copy the formulas :)
 
Upvote 0

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