Cell Formula

agonysWeeper

Board Regular
Joined
Feb 4, 2011
Messages
146
A1 = 0 and C1 = -1,500
A2 = 0 and C2 = =IF(A2=0,0,C1+A2)
A3 = 300 and C3 = =IF(A3=0,0,C1+C2+A3)
A4 = 500 and C4 = =IF(A3=0,0,C1+C2+C3+A4)

then the column C looks like this
C1 = -1,500
C2 = blank
C3 = -1,200
C4 = -2,200 (I got error in C4 cause I want the total is -900)
can anyone give me correct formula?
Thanks
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
I don't understand how you want it to be -900. If you want the cumulative value while ignoring zeroes you should refer to column A instead of column C:


Excel Workbook
ABC
10*-1500
20*0
3300*-1200
4500*-700
Sheet1


However, this is -700 and not -900.
 
Upvote 0
A1 = 0 and C1 = -1,500
A2 = 0 and C2 = =IF(A2=0,0,C1+A2)
A3 = 300 and C3 = =IF(A3=0,0,C1+C2+A3)
A4 = 500 and C4 = =IF(A3=0,0,C1+C2+C3+A4)

then the column C looks like this
C1 = -1,500
C2 = blank
C3 = -1,200
C4 = -2,200 (I got error in C4 cause I want the total is -900)
can anyone give me correct formula?
Thanks

no error in the formula
there seems to be error in logic it self in the data
 
Upvote 0
I don't understand how you want it to be -900. If you want the cumulative value while ignoring zeroes you should refer to column A instead of column C:


Excel Workbook
ABC
10*-1500
20*0
3300*-1200
4500*-700
Sheet1


However, this is -700 and not -900.

Hi, sorry for the wrong input, anyway its -700
but this is my C4 formula =IF(A4=0,0,C1+C2+C3+A4) and I got -2200 but I need -700
If you have any idea or other formula, more appreciated. thanks
 
Upvote 0
I gave you the formulas, you quoted them. I don't know how to make it any more clear than I already have.
 
Upvote 0
moonfish, you got error in your post according to C4 formula:
C1+A2+A3+A4

In agonysWeeper original is:
C1+C2+C3+A4
 
Upvote 0
@Sektor: I know, there's an error in his formula and I fixed it. This usually leads to a formula being different.

I even explained why I did this in my first post.

He is trying to create a cumulative version of column A but he wants to display zero in column C if there is zero in column A. This means the traditional method is out of the question. For the record, here's the traditional method:

Excel Workbook
AB
10-1500
20-1500
3300-1200
4500-700
Sheet2
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,723
Members
452,939
Latest member
WCrawford

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