#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 78
Default =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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default =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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 78
Default =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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default =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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 78
Default =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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default =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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default =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
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
copy of excel file not showing formulal/function in the function b oaallam Excel Discussion (Misc queries) 4 September 6th 07 01:20 PM
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) [email protected] Excel Worksheet Functions 0 September 5th 06 03:44 PM
Offset function with nested match function not finding host ss. MKunert Excel Worksheet Functions 1 March 21st 06 10:46 PM
Emulate Index/Match combo function w/ VBA custom function Spencer Hutton Excel Worksheet Functions 2 May 2nd 05 05:26 PM
Nested IF Function, Date Comparing, and NetworkDays Function carl Excel Worksheet Functions 2 December 29th 04 09:57 PM


All times are GMT +1. The time now is 04:22 PM.

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"