# Formula Sum Positives If not start sum Negative



## motilulla (Dec 26, 2022)

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.xlsABCDEFGH1234With MYNeed ThisResult BYResults5FormulaResultFormulaResults6111172222833339 -1 10 -2 11 -3 12 -4 13111114222215333316 -1 17 -2 18 -3 19 -4 20 -5 21 -6 22111123222224333325 -1 26 -2 27 -3 28 -4 29 -5 30 -6 31 -7 32 -8 33 -9 34 -10 351111363738Sheet3Cell FormulasRangeFormulaE6:E35,C6:C35C6=IF(E6="","",E6)

Please help

Thank you all.

Regards,
Moti


----------



## Peter_SSs (Dec 26, 2022)

Like this?

22 12 26.xlsmDEFG4Need ThisResult BYResults5ResultFormulaResults6111722283339-1 10-2 11-3 12-4 13111142221533316-1 17-2 18-3 19-4 20-5 21-6 22111232222433325-1 26-2 27-3 28-4 29-5 30-6 31-7 32-8 33-9 34-10 35111Sheet2 (2)Cell FormulasRangeFormulaD6:D35D6=IF(G6="",IF(G5="",D5-1,-1),G6)E6:E35E6=IF(G6="","",G6)


----------



## motilulla (Dec 26, 2022)

Peter_SSs said:


> Like this?
> 
> 22 12 26.xlsmDEFG4Need ThisResult BYResults5ResultFormulaResults6111722283339-1 10-2 11-3 12-4 13111142221533316-1 17-2 18-3 19-4 20-5 21-6 22111232222433325-1 26-2 27-3 28-4 29-5 30-6 31-7 32-8 33-9 34-10 35111Sheet2 (2)Cell FormulasRangeFormulaD6:D35D6=IF(G6="",IF(G5="",D5-1,-1),G6)E6:E35E6=IF(G6="","",G6)


*Peter**, *formula worked as treat, thank you for your kind help

Good Luck!

Kind Regards,
Moti


----------



## motilulla (Dec 26, 2022)

motilulla said:


> *Peter**, *formula worked as treat, thank you for your kind help
> 
> Good Luck!
> 
> ...


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.xlsABCDEF1234Need ThisResults5ResultResults6117228339-110-211-312-413141427153121641517-118-219-320-421-522120232242432625427265322764928-129-230-331-432-533-634-735128362503738Sheet4

Please help

Thank you all.

Kind Regards,
Moti


----------



## Sufiyan97 (Dec 26, 2022)

Try

Book1DEFGH67Need ThisResults8ResultResults9111022113312-113-214-315-416141727183121941520-121-222-323-424-525120262242732628427295323064931-132-233-334-435-536-637-7381283925040Sheet2Cell FormulasRangeFormulaE9:E39E9=IF(G9="",IF(G8="",N(E8)-1,-1),IF(AND(G9<>"",G8<>""),N(E8)+1,1))


----------



## motilulla (Dec 26, 2022)

Sufiyan97 said:


> Try
> 
> Book1DEFGH67Need ThisResults8ResultResults9111022113312-113-214-315-416141727183121941520-121-222-323-424-525120262242732628427295323064931-132-233-334-435-536-637-7381283925040Sheet2Cell FormulasRangeFormulaE9: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! 

Thank you so much for your kind help

Good Luck!

Kind Regards,
Moti


----------



## Sufiyan97 (Dec 26, 2022)

You're welcome.
Glad it helped.


----------



## Peter_SSs (Dec 26, 2022)

motilulla said:


> *Sufiyan97*, Greta formula did worked as request perfect!


You could also consider this simpler one.

22 12 26.xlsmEFG7Need ThisResults8ResultResults9111022113312-113-214-315-416141727183121941520-121-222-323-424-525120262242732628427295323064931-132-233-334-435-536-637-73812839250Sheet3Cell FormulasRangeFormulaE9:E39E9=IF(G9="",IF(G8="",E8-1,-1),IF(N(G8),E8+1,1))


----------



## motilulla (Dec 27, 2022)

Peter_SSs said:


> You could also consider this simpler one.
> 
> 22 12 26.xlsmEFG7Need ThisResults8ResultResults9111022113312-113-214-315-416141727183121941520-121-222-323-424-525120262242732628427295323064931-132-233-334-435-536-637-73812839250Sheet3Cell FormulasRangeFormulaE9:E39E9=IF(G9="",IF(G8="",E8-1,-1),IF(N(G8),E8+1,1))


*Peter**,* yes this is good one,  thank you so much for you kind help

Good Luck.

Kind Regards,
Moti


----------

