# Cost calculation below and above together

#### leatharey

##### New Member
I have a set of data and i have d
one vlookup what i need is to calculate cost on two different base levels

https://imgur.com/IvskNuw

heres a link to the image.

now i when i enter data that is in the lvl column in the second table and the third table i have set for vlookup to get the data corresponding to that lvl in the total column.. for example as below and in the image above
i want to calculate cost of the totals based on a set lvl that is lets say like if level 5 is starting lvl in the first table and ending or req level is 65 in the second table for it the base level is set to 50 want get it base on that lvl 50. if below level 50 (Cost is 20) and if above 50 (cost is 10) keep in mind the cost is calculated based on the total but also starting lvl total isnt calulated just only the final lvl req total and also there is a difference between the totals. i hope i have explained or am I confusing you guys.

id lvl total id lvl req total Difference Gained lvl cost below base lvel cost above base level
a 7 650 a 55 32223 31573
b 60 45000 b 75 65000 20000
c 25 8500 c 45 25000 16500

### 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"

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,164,652
Messages
5,838,597
Members
430,557
Latest member
MK15

### 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.

### Which adblocker are you using?

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

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