Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default 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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default 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




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default 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







  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default 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




  #7   Report Post  
Posted to microsoft.public.excel.programming
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





  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default 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





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
if statement in formula Derrick Excel Discussion (Misc queries) 7 July 8th 09 06:16 PM
Need help with if-then statement in formula mcmilja Excel Discussion (Misc queries) 6 April 20th 08 06:09 PM
Formula expected end of statement error, typing formula into cell as part of VBA macro [email protected] Excel Programming 1 July 20th 06 07:58 PM
Can I use IF statement with a formula? Michael NYC Excel Worksheet Functions 1 October 1st 05 04:45 AM
IF statement with formula ladee_bird Excel Programming 2 August 10th 05 05:19 PM


All times are GMT +1. The time now is 04:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"