Variable Calculation

Libra0099

Active Member
Joined
Apr 28, 2007
Messages
273
Dear All,

I need a formula which can Calculate the result in cell “E27”. Furthermore this should be flexible if I change the no of unit it should give the desired results. For example in cell 10, 12, 16 & 21

Your hlep will be very much appreciated and I am in need of this very badly.

Excel Workbook
DEFGH
3VendorUpto 15 (Units)From 15 to 30 (Units)From 30 to 40 (Units)More than 40 (Units)
4*****
5A* * * * * * * * * * *225* * * * * * * * * * *250* * * * * * * * * * *260* * * * * * * * * * *290
6*****
7*****
8UnitsTotal Amount***
9*****
1014* * * * * * * * * 3,150***
11*****
1218* * * * * * * * * 4,125***
13*** * * * * * * * * 3,375**
14*** * * * * * * * * * *750**
15*****
1635* * * * * * * * * 8,425***
17*** * * * * * * * * 3,375**
18*** * * * * * * * * 3,750**
19*** * * * * * * * * 1,300**
20*****
2145* * * * * * * * * 9,725***
22*** * * * * * * * * 3,375**
23*** * * * * * * * * 3,750**
24*** * * * * * * * * 2,600**
25*** * * * * * * * * 1,450**
26*****
27100* * * * * * * * * 9,725***
28*** * * * * * * * * 3,375**
29*** * * * * * * * * 3,750**
30*** * * * * * * * * 2,600**
31*** * * * * * * *17,400**
Sheet1
 

Some videos you may like

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

shg

MrExcel MVP
Joined
May 7, 2008
Messages
21,782
Office Version
  1. 2010
Platform
  1. Windows
Code:
      -------A------- --B--- -C- -D- -E- -F- G --H-- --I---
  1       Vendor      helper  0  15  30  40    Units Amount
  2   Acme Mousetraps        225 250 260 290      35   8425

The formula in I2 is

=SUMPRODUCT((H2 > $C$1:$F$1) * (H2 - $C$1:$F$1) * (C2:F2 - B2:E2))
 

Similar threads

Watch MrExcel Video

Forum statistics

Threads
1,123,333
Messages
5,601,008
Members
414,421
Latest member
tonybear1994

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
Top