IF statement in formula

M

mathel

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
 
M

mathel

Thank you. I tried the formula as suggested: =IF(AND(F46="",D15=""),"",D15)
, however, the result is '0' instread of a blank. Another individual
suggested the following formula which seems to work fine:
=IF(F46<>"",IF(D15="","",D15),"")

Thanks again for your help!
 
R

Rick Rothstein

I think Bob accidentally used the wrong comparison symbol for F46. Try this
modification to his formula...

=IF(AND(F46<>"",D15=""),"",D15)
 
M

Maperalia

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
 
R

Rick Rothstein

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.
 
M

Maperalia

Rick;
Thanks for your quick response.
I replaced the "" to O as shown below:

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

However, it is working only when the cell C22 is empty. I do not know if is
possible what I am looking for. Basically, what I need is to active
statements that have descriptions typed. For example, I typed numbers in the
cell C22, D22, E22 and C23, D23, E23 and I got the following result:

( 2 ) Full ( 23.875" ) + ( 1 ) 2 ( 4.75" ) + ( ) ( " ) + ( ) ( "
) + ( ) ( " ) + ( ) ( " )

Although the cells C24, C25, C26, and C27 do not have any information all
the parenthesis () and apostrophes†appear.

Could you please tell me how to fix it?

Kind regards.

Maperalia
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top