PC Review


Reply
Thread Tools Rate Thread

Combine an And OR function

 
 
Woodi2
Guest
Posts: n/a
 
      29th Apr 2010
I have a little function that i need help with.

=IF(AND($B9="Z",AE9=35,J9=1),1000). This function works fine, however I
need to add in somehow that J9 could equal M or 1 or C and I would like the
function still to be true and return the value as 1000.
As I see it, this is smoehow combining and AND OR statement but I cant get
it to work.
Thanks
 
Reply With Quote
 
 
 
 
Pete_UK
Guest
Posts: n/a
 
      29th Apr 2010
Try this:

=IF(AND($B9="Z",AE9=35,OR(J9=1,J9="M",J9="C")),1000,"not defined")

This will retern "not defined" if the conditions are not met.

Hope this helps.

Pete

On Apr 29, 4:20*pm, Woodi2 <Woo...@discussions.microsoft.com> wrote:
> I have a little function that i need help with.
>
> =IF(AND($B9="Z",AE9=35,J9=1),1000). *This function works fine, however I
> need to add in somehow that J9 could equal M or 1 or C and I would like the
> function still to be true and return the value as 1000.
> As I see it, this is smoehow combining and AND OR statement but I cant get
> it to work.
> Thanks


 
Reply With Quote
 
RonaldoOneNil
Guest
Posts: n/a
 
      29th Apr 2010
=IF(AND($B9="Z",AE9=35,OR(J9="M",J9=1,J9="C")),1000,"NOT 1000")

"Woodi2" wrote:

> I have a little function that i need help with.
>
> =IF(AND($B9="Z",AE9=35,J9=1),1000). This function works fine, however I
> need to add in somehow that J9 could equal M or 1 or C and I would like the
> function still to be true and return the value as 1000.
> As I see it, this is smoehow combining and AND OR statement but I cant get
> it to work.
> Thanks

 
Reply With Quote
 
JudithJubilee
Guest
Posts: n/a
 
      29th Apr 2010
Hi Wood12

try this:

=IF(AND(AND($B9="Z",AE9=35),or(J9=1,J9="M",J9="C")),1000).


--
Hope this helps


"Woodi2" wrote:

> I have a little function that i need help with.
>
> =IF(AND($B9="Z",AE9=35,J9=1),1000). This function works fine, however I
> need to add in somehow that J9 could equal M or 1 or C and I would like the
> function still to be true and return the value as 1000.
> As I see it, this is smoehow combining and AND OR statement but I cant get
> it to work.
> Thanks

 
Reply With Quote
 
Joe User
Guest
Posts: n/a
 
      29th Apr 2010
"Woodi2" wrote:
> =IF(AND($B9="Z",AE9=35,J9=1),1000).
> This function works fine, however I need to add
> in somehow that J9 could equal M or 1 or C and
> I would like the function still to be true and return
> the value as 1000.


Try:

=IF(AND($B9="Z",AE9=35,OR(J9={1,"M","C"})), 1000, "")

Note the last parameter: the function now returns the null string ("") when
the conditions are not met. As you wrote it, the function returned FALSE;
generally not what people want to see.


----- original message -----

"Woodi2" wrote:
> I have a little function that i need help with.
>
> =IF(AND($B9="Z",AE9=35,J9=1),1000). This function works fine, however I
> need to add in somehow that J9 could equal M or 1 or C and I would like the
> function still to be true and return the value as 1000.
> As I see it, this is smoehow combining and AND OR statement but I cant get
> it to work.
> Thanks

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to combine Combo Box function with Vlookup function KH Microsoft Excel Worksheet Functions 2 5th Apr 2010 01:24 PM
how to combine an IF Function with a lookup function to determine =?Utf-8?B?Y2F0aDYzQHByaW11cy5jb20uYXU=?= Microsoft Excel Worksheet Functions 1 5th Dec 2006 06:09 AM
please help how to combine IF function with Countif function =?Utf-8?B?RGluZXNo?= Microsoft Excel Worksheet Functions 6 30th Mar 2006 08:28 PM
Help - combine OR and AND in IF function svenk Microsoft Excel Worksheet Functions 3 11th Feb 2006 03:38 PM
how do i combine IF and OR function =?Utf-8?B?TWFyY2Vs?= Microsoft Excel Worksheet Functions 5 28th Nov 2005 11:41 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:24 PM.