Formula help

Matt_Chelmsford

Board Regular
Joined
Jan 31, 2009
Messages
160
I need help with a Formula.

*

In column A1 to A5 I have 5 categories. A B C D E

*

In column B1 to B5 I have the number of units to be charged.
*


The problem I have that the first three units will be free (in the order of A to E)

*

Therefore if in B1 there are 2 units for A and in B2 there are 2 units for B then I want to show in

C1 0 and C2 1.

*

I hope this makes sense

*

Matthew
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Insert a row above your data (and enter some headings if you want). In C2 enter:

=MAX(0,SUM(B$2:B2)-3)-SUM(C$1:C1)

and copy down.
 
Upvote 0
may be this will help
Excel Workbook
ABC
1A20
2B21
3C23
4D25
5E27
Sheet2
Excel 2007
Cell Formulas
RangeFormula
C1=IF(B1<3,0)
C2=IF(SUM($B$1:B2)>3,SUM($B$1:B2)-3,0)
C3=IF(SUM($B$1:B3)>3,SUM($B$1:B3)-3,0)
C4=IF(SUM($B$1:B4)>3,SUM($B$1:B4)-3,0)
C5=IF(SUM($B$1:B5)>3,SUM($B$1:B5)-3,0)
 
Upvote 0

Forum statistics

Threads
1,224,550
Messages
6,179,463
Members
452,915
Latest member
hannnahheileen

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