ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   IF statement in formula (https://www.excelbanter.com/excel-programming/424541-if-statement-formula.html)

mathel

IF statement in formula
 
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

joel

IF statement in formula
 
from
=IF(F46="",IF(D15="","",D15))

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


"mathel" wrote:

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


Bob Phillips[_3_]

IF statement in formula
 
=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




mathel

IF statement in formula
 
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!
--
Linda


"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





Rick Rothstein

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

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

--
Rick (MVP - Excel)


"mathel" wrote in message
...
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!
--
Linda


"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






maperalia

IF statement in formula
 
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





Rick Rothstein

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






maperalia

IF statement in formula
 
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

"Rick Rothstein" wrote:

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







All times are GMT +1. The time now is 09:21 AM.

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