Need help in my Cell formula

agonysWeeper

Board Regular
Joined
Feb 4, 2011
Messages
146
C1 = 1,500
A2 = 0
C2 = IF(A2=0,0,C1+A2) which is total of 1,500 because the A2 is 0 but the cell show a 0.
A3 = 300
C3 = IF(A3=0,0,C2+A3) which is 300 but I am looking for 1,800

I want this set up.
C1 = 1,500
A2 = 0
C2 = -
A3 = 300
C3 = 1,800


Anyone help?
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Enter the following into C2 and copy down as far as necessary:
=IF(A2,SUM(C$1:C1)+A2,0)
 
Upvote 0
Enter the following into C2 and copy down as far as necessary:
=IF(A2,SUM(C$1:C1)+A2,0)

This is working, but how about if C1 is (50,000), the next row will increase. if A2 = 300 C2 must be (49,700) and A3 = 500 C3 must be (49,200)
Please help again. :)
 
Upvote 0
Neil,

Your answer got me thinking, I based mine purely on the example, but on the assumption that it is going to be copied down, I think maybe

=IF(A2,SUM(A$2:A2,$C$1),0)

Maybe we're both on the wrong track :confused:
 
Upvote 0
This is working, but how about if C1 is (50,000), the next row will increase. if A2 = 300 C2 must be (49,700) and A3 = 500 C3 must be (49,200)
Please help again. :)

Can you explain clearly the logic behind the calculations? In your first example you wanted to include the value in C1, now you're excluding it.
 
Upvote 0
C1 = 1,500
A2 = 0
C2 = IF(A2=0,0,C1+A2) which is total of 1,500 because the A2 is 0 but the cell show a 0.
A3 = 300
C3 = IF(A3=0,0,C2+A3) which is 300 but I am looking for 1,800

I want this set up.
C1 = 1,500
A2 = 0
C2 = -
A3 = 300
C3 = 1,800


Anyone help?

Just to change the value of C1= 1,500 to (1,500)
then A2 = 0
C2 = -
A3 = 300
C3 = (1,200)

Please help.
 
Upvote 0
Neil,

Your answer got me thinking, I based mine purely on the example, but on the assumption that it is going to be copied down, I think maybe

=IF(A2,SUM(A$2:A2,$C$1),0)

Maybe we're both on the wrong track :confused:

It's always interesting seeing how differently people interpret what posters are looking for.
 
Upvote 0

Forum statistics

Threads
1,224,597
Messages
6,179,808
Members
452,944
Latest member
2558216095

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