Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
if statement in formula | Excel Discussion (Misc queries) | |||
Need help with if-then statement in formula | Excel Discussion (Misc queries) | |||
Formula expected end of statement error, typing formula into cell as part of VBA macro | Excel Programming | |||
Can I use IF statement with a formula? | Excel Worksheet Functions | |||
IF statement with formula | Excel Programming |