Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
=IF(AND... function
I need 2 conditions to meet else it should be an empty sell.
My code is =IF(AND(K47="abc", B3=I49), (H49-B3)*J49*1000, (H49-I49)*J49*1000) I still get the calculated value, even if cell K47 is blank. Please help. Thanks. Mukesh |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
=IF(AND... function
I need 2 conditions to meet else it should be an empty sell.
=IF(AND(K47="abc", B3=I49), (H49-B3)*J49*1000, (H49-I49)*J49*1000) I still get the calculated value, even if cell K47 is blank. If K47 is blank then AND = FALSE and the IF function evaluates the value_if_false argument which is: (H49-I49)*J49*1000 So, if both conditions are not met and you want the cell left blank then: =IF(AND(K47="abc", B3=I49), (H49-B3)*J49*1000,"") -- Biff Microsoft Excel MVP "Mukesh" wrote in message ... I need 2 conditions to meet else it should be an empty sell. My code is =IF(AND(K47="abc", B3=I49), (H49-B3)*J49*1000, (H49-I49)*J49*1000) I still get the calculated value, even if cell K47 is blank. Please help. Thanks. Mukesh |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
=IF(AND... function
=IF(AND(K47="abc", B3=I49), (H49-B3)*J49*1000,""),
I do get a blank cell, but it doesn't calculate if B3<=I49. I am not able to put code right. IF K47="abc" && (B3=I49), (H49-B3)*J49*1000, " " OR IF K47="abc" && (B3<=I49), (H49-I49)*J49*1000, " " Please advise. Thanks. Mukesh "T. Valko" wrote: I need 2 conditions to meet else it should be an empty sell. =IF(AND(K47="abc", B3=I49), (H49-B3)*J49*1000, (H49-I49)*J49*1000) I still get the calculated value, even if cell K47 is blank. If K47 is blank then AND = FALSE and the IF function evaluates the value_if_false argument which is: (H49-I49)*J49*1000 So, if both conditions are not met and you want the cell left blank then: =IF(AND(K47="abc", B3=I49), (H49-B3)*J49*1000,"") -- Biff Microsoft Excel MVP "Mukesh" wrote in message ... I need 2 conditions to meet else it should be an empty sell. My code is =IF(AND(K47="abc", B3=I49), (H49-B3)*J49*1000, (H49-I49)*J49*1000) I still get the calculated value, even if cell K47 is blank. Please help. Thanks. Mukesh |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
=IF(AND... function
IF K47="abc" && (B3=I49), (H49-B3)*J49*1000, " " OR
IF K47="abc" && (B3<=I49), (H49-I49)*J49*1000, " " Ok, but you have a logic conflict: If B3 does = I49 what should the result be? According to the above it should be both: (H49-B3)*J49*1000 (H49-I49)*J49*1000 I'll assume the logic should be =I49 for (H49-B3)*J49*1000 and <I49 for(H49-I49)*J49*1000 =IF(K47="abc",IF(B3=I49,(H49-B3)*J49*1000,(H49-I49)*J49*1000),"") That doesn't account for empty cells! -- Biff Microsoft Excel MVP "Mukesh" wrote in message ... =IF(AND(K47="abc", B3=I49), (H49-B3)*J49*1000,""), I do get a blank cell, but it doesn't calculate if B3<=I49. I am not able to put code right. IF K47="abc" && (B3=I49), (H49-B3)*J49*1000, " " OR IF K47="abc" && (B3<=I49), (H49-I49)*J49*1000, " " Please advise. Thanks. Mukesh "T. Valko" wrote: I need 2 conditions to meet else it should be an empty sell. =IF(AND(K47="abc", B3=I49), (H49-B3)*J49*1000, (H49-I49)*J49*1000) I still get the calculated value, even if cell K47 is blank. If K47 is blank then AND = FALSE and the IF function evaluates the value_if_false argument which is: (H49-I49)*J49*1000 So, if both conditions are not met and you want the cell left blank then: =IF(AND(K47="abc", B3=I49), (H49-B3)*J49*1000,"") -- Biff Microsoft Excel MVP "Mukesh" wrote in message ... I need 2 conditions to meet else it should be an empty sell. My code is =IF(AND(K47="abc", B3=I49), (H49-B3)*J49*1000, (H49-I49)*J49*1000) I still get the calculated value, even if cell K47 is blank. Please help. Thanks. Mukesh |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
=IF(AND... function
That worked! thanks a lot. Mukesh "T. Valko" wrote: IF K47="abc" && (B3=I49), (H49-B3)*J49*1000, " " OR IF K47="abc" && (B3<=I49), (H49-I49)*J49*1000, " " Ok, but you have a logic conflict: If B3 does = I49 what should the result be? According to the above it should be both: (H49-B3)*J49*1000 (H49-I49)*J49*1000 I'll assume the logic should be =I49 for (H49-B3)*J49*1000 and <I49 for(H49-I49)*J49*1000 =IF(K47="abc",IF(B3=I49,(H49-B3)*J49*1000,(H49-I49)*J49*1000),"") That doesn't account for empty cells! -- Biff Microsoft Excel MVP "Mukesh" wrote in message ... =IF(AND(K47="abc", B3=I49), (H49-B3)*J49*1000,""), I do get a blank cell, but it doesn't calculate if B3<=I49. I am not able to put code right. IF K47="abc" && (B3=I49), (H49-B3)*J49*1000, " " OR IF K47="abc" && (B3<=I49), (H49-I49)*J49*1000, " " Please advise. Thanks. Mukesh "T. Valko" wrote: I need 2 conditions to meet else it should be an empty sell. =IF(AND(K47="abc", B3=I49), (H49-B3)*J49*1000, (H49-I49)*J49*1000) I still get the calculated value, even if cell K47 is blank. If K47 is blank then AND = FALSE and the IF function evaluates the value_if_false argument which is: (H49-I49)*J49*1000 So, if both conditions are not met and you want the cell left blank then: =IF(AND(K47="abc", B3=I49), (H49-B3)*J49*1000,"") -- Biff Microsoft Excel MVP "Mukesh" wrote in message ... I need 2 conditions to meet else it should be an empty sell. My code is =IF(AND(K47="abc", B3=I49), (H49-B3)*J49*1000, (H49-I49)*J49*1000) I still get the calculated value, even if cell K47 is blank. Please help. Thanks. Mukesh |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
=IF(AND... function
You're welcome. Thanks for the feedback!
-- Biff Microsoft Excel MVP "Mukesh" wrote in message ... That worked! thanks a lot. Mukesh "T. Valko" wrote: IF K47="abc" && (B3=I49), (H49-B3)*J49*1000, " " OR IF K47="abc" && (B3<=I49), (H49-I49)*J49*1000, " " Ok, but you have a logic conflict: If B3 does = I49 what should the result be? According to the above it should be both: (H49-B3)*J49*1000 (H49-I49)*J49*1000 I'll assume the logic should be =I49 for (H49-B3)*J49*1000 and <I49 for(H49-I49)*J49*1000 =IF(K47="abc",IF(B3=I49,(H49-B3)*J49*1000,(H49-I49)*J49*1000),"") That doesn't account for empty cells! -- Biff Microsoft Excel MVP "Mukesh" wrote in message ... =IF(AND(K47="abc", B3=I49), (H49-B3)*J49*1000,""), I do get a blank cell, but it doesn't calculate if B3<=I49. I am not able to put code right. IF K47="abc" && (B3=I49), (H49-B3)*J49*1000, " " OR IF K47="abc" && (B3<=I49), (H49-I49)*J49*1000, " " Please advise. Thanks. Mukesh "T. Valko" wrote: I need 2 conditions to meet else it should be an empty sell. =IF(AND(K47="abc", B3=I49), (H49-B3)*J49*1000, (H49-I49)*J49*1000) I still get the calculated value, even if cell K47 is blank. If K47 is blank then AND = FALSE and the IF function evaluates the value_if_false argument which is: (H49-I49)*J49*1000 So, if both conditions are not met and you want the cell left blank then: =IF(AND(K47="abc", B3=I49), (H49-B3)*J49*1000,"") -- Biff Microsoft Excel MVP "Mukesh" wrote in message ... I need 2 conditions to meet else it should be an empty sell. My code is =IF(AND(K47="abc", B3=I49), (H49-B3)*J49*1000, (H49-I49)*J49*1000) I still get the calculated value, even if cell K47 is blank. Please help. Thanks. Mukesh |
#7
Posted to microsoft.public.excel.misc
|
|||
|
|||
=IF(AND... function
=IF(K47="abc", (H49-MAX(B3,I49))*J49*1000, "")
-- David Biddulph "Mukesh" wrote in message ... I need 2 conditions to meet else it should be an empty sell. My code is =IF(AND(K47="abc", B3=I49), (H49-B3)*J49*1000, (H49-I49)*J49*1000) I still get the calculated value, even if cell K47 is blank. Please help. Thanks. Mukesh |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
copy of excel file not showing formulal/function in the function b | Excel Discussion (Misc queries) | |||
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) | Excel Worksheet Functions | |||
Offset function with nested match function not finding host ss. | Excel Worksheet Functions | |||
Emulate Index/Match combo function w/ VBA custom function | Excel Worksheet Functions | |||
Nested IF Function, Date Comparing, and NetworkDays Function | Excel Worksheet Functions |