Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

if and statements additions

Status
Not open for further replies.

stoke

IS-IT--Management
Apr 15, 2003
50
AU
=IF(AND(D11=0,G11=0),"0%",(G11-D11)/D11)

i have the above formula - how do i ensure that if D11=0 and G10 = >0 i get a result of 100%?
whilst maintaining the above formula?

i think that i need to add in an additional if statement but not sure how?

Thank you,
 
=if(and(d11=0,g10>0),"100%",IF(AND(D11=0,G11=0),"0%",(G11-D11)/D11))
 
I can't say I agree with what you that the %increase from zero to a non zero number is 100%, but ...
Code:
=IF(D11=0,ABS(SIGN(G11)),(G11-D11)/D11)
will work.

Steve
 
I guess if you think of any increase over 0 a %100 increase, then you would think of any decrease over 0 a 100% decrease. In that case...
Code:
=IF(D11=0,SIGN(G11),(G11-D11)/D11)
will work.

Steve

 
Thank you very much guys -i really appreciate your help.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top