Formula Sum Positives If not start sum Negative

motilulla

Well-known Member
Joined
Feb 13, 2008
Messages
2,422
Office Version
  1. 2010
Using Excel 2010

Hello,

I got results in the columns “G”, in the column “E” there is formula which drive result from Column “G”

In the column “C” I have set formula which sum if value in the column “G” is >””

But I am not able to set the formula if column =”” get negative values sum as shown in the Column “D”…so far need formula for column D as shown in the example below.

MrExcel Question.xls
ABCDEFGH
1
2
3
4With MYNeed ThisResult BYResults
5FormulaResultFormulaResults
61111
72222
83333
9 -1 
10 -2 
11 -3 
12 -4 
131111
142222
153333
16 -1 
17 -2 
18 -3 
19 -4 
20 -5 
21 -6 
221111
232222
243333
25 -1 
26 -2 
27 -3 
28 -4 
29 -5 
30 -6 
31 -7 
32 -8 
33 -9 
34 -10 
351111
36
37
38
Sheet3
Cell Formulas
RangeFormula
E6:E35,C6:C35C6=IF(E6="","",E6)


Please help

Thank you all.

Regards,
Moti
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Upvote 0
Peter, formula worked as treat, thank you for your kind help

Good Luck!

Kind Regards,
Moti :)
Hello again, I need a modification could it be possible to get formula results in the column “C” even the numbers are as shown in the column “E” where are =“” count in the column “C” as – and add them -1,-2, and -3….otherwise + as 1,2,3 soon

MrExcel Question.xls
ABCDEF
1
2
3
4Need ThisResults
5ResultResults
611
722
833
9-1
10-2
11-3
12-4
1314
1427
15312
16415
17-1
18-2
19-3
20-4
21-5
22120
23224
24326
25427
26532
27649
28-1
29-2
30-3
31-4
32-5
33-6
34-7
35128
36250
37
38
Sheet4


Please help

Thank you all.

Kind Regards,
Moti
 
Upvote 0
Try

Book1
DEFGH
6
7Need ThisResults
8ResultResults
911
1022
1133
12-1
13-2
14-3
15-4
1614
1727
18312
19415
20-1
21-2
22-3
23-4
24-5
25120
26224
27326
28427
29532
30649
31-1
32-2
33-3
34-4
35-5
36-6
37-7
38128
39250
40
Sheet2
Cell Formulas
RangeFormula
E9:E39E9=IF(G9="",IF(G8="",N(E8)-1,-1),IF(AND(G9<>"",G8<>""),N(E8)+1,1))
Sufiyan97, Greta formula did worked as request perfect! (y)

Thank you so much for your kind help

Good Luck!

Kind Regards,
Moti :)
 
Upvote 0
Upvote 0
Solution
You could also consider this simpler one.

22 12 26.xlsm
EFG
7Need ThisResults
8ResultResults
911
1022
1133
12-1
13-2
14-3
15-4
1614
1727
18312
19415
20-1
21-2
22-3
23-4
24-5
25120
26224
27326
28427
29532
30649
31-1
32-2
33-3
34-4
35-5
36-6
37-7
38128
39250
Sheet3
Cell Formulas
RangeFormula
E9:E39E9=IF(G9="",IF(G8="",E8-1,-1),IF(N(G8),E8+1,1))
Peter, yes this is good one, (y) thank you so much for you kind help

Good Luck.

Kind Regards,
Moti :)
 
Upvote 0

Forum statistics

Threads
1,224,825
Messages
6,181,190
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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