ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Formulas (https://www.excelbanter.com/excel-discussion-misc-queries/201919-formulas.html)

Vanessa

Formulas
 
I am having trouble with a field in which I am simply trying to calculate
=B30/B31
because I am using some IF formulas in the monthly values from where B30 and
B31 are pulled from. The formulas say IF September 2008 0, Sum (all cell to
make the YTD value), otherwise leave blank. This works fine. I ran into a
problem with the % field which simply divides 2007 over 2008 value to come up
with increase or decrease. if the values are left blank with the previous IF
formula, the % field returns an error if i simply say =B30/B31, How can I say
IF B30=0 and B31=0, leave blank, otherwise, B31/B31. I am using the below
formula and it is not working. =IF(AND(B30=0,B31=0)," ",B30/B31)


Peo Sjoblom[_2_]

Formulas
 
First of all don't insert a space, insert a blank which is "" as opposed to
" "

This assumes B31 cannot be 0


=IF(COUNT(B30:B31)=2,B30/B31,"")


If B31 can be zero

=IF(OR(COUNT(B30:B31)<2,B31=0),"",B30/B31)


--


Regards,


Peo Sjoblom

"Vanessa" wrote in message
...
I am having trouble with a field in which I am simply trying to calculate
=B30/B31
because I am using some IF formulas in the monthly values from where B30
and
B31 are pulled from. The formulas say IF September 2008 0, Sum (all cell
to
make the YTD value), otherwise leave blank. This works fine. I ran into a
problem with the % field which simply divides 2007 over 2008 value to come
up
with increase or decrease. if the values are left blank with the previous
IF
formula, the % field returns an error if i simply say =B30/B31, How can I
say
IF B30=0 and B31=0, leave blank, otherwise, B31/B31. I am using the below
formula and it is not working. =IF(AND(B30=0,B31=0)," ",B30/B31)





All times are GMT +1. The time now is 07:45 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com