View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default IF statement in formula

Try changing all the "" to 0 inside the AND function call (and only inside
that function call). Testing for 0 will be TRUE if the cell is either empty
or contains a 0.

--
Rick (MVP - Excel)


"Maperalia" wrote in message
...
Bob;
I have tried to use your formula in my case which is:

=IF(AND(C22="",C23="",C24="",C25="",C26="",C27="") ,"", ("( "&C22&" )
"&D22&" ( "&E22&""" ) + ( "&C23&" ) "&D23&" ( "&E23&""" ) + (
"&C24&" )
"&D24&" ( "&E24&""" ) + ( "&C25&" ) "&D25&" ( "&E25&""" ) + (
"&C26&" )
"&D26&" ( "&E26&""" ) + ( "&C27&" ) "&D27&" ( "&E27&""" ) "))

What I need is to each condition apply where it correspond. For example if
C26=0 then the statement with C26 will not appear.

Could you please help me with this matter?

Thanks in advance.
Maperalia

"Bob Phillips" wrote:

=IF(AND(F46="",D15=""),"",D15)


--
__________________________________
HTH

Bob

"mathel" wrote in message
...
I am working with Excel 2003. I have a worksheet I am trying to get the
cell
value (in number) based on the condition of 2 cells or leave the cell
blank.

The result I need in Cell D47 is: if Cell F46 and D15 is blank, blank
the
cell, but, if D15 is greater than blank, I need the absolute of the
number
in
Cell D15. I have tried the following formula, however, I get the
result
"False", so I am doing something wrong.

=IF(F46="",IF(D15="","",D15))

Thanks
--
Linda