A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Combine an And OR function



 
 
Thread Tools Display Modes
  #1  
Old April 29th, 2010, 04:20 PM posted to microsoft.public.excel.worksheet.functions
Woodi2
external usenet poster
 
Posts: 24
Default Combine an And OR function

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
  #2  
Old April 29th, 2010, 04:37 PM posted to microsoft.public.excel.worksheet.functions
Pete_UK
external usenet poster
 
Posts: 8,780
Default Combine an And OR function

Try this:

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

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

Hope this helps.

Pete

On Apr 29, 4:20*pm, 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


  #3  
Old April 29th, 2010, 04:51 PM posted to microsoft.public.excel.worksheet.functions
RonaldoOneNil
external usenet poster
 
Posts: 345
Default Combine an And OR function

=IF(AND($B9="Z",AE9=35,OR(J9="M",J9=1,J9="C")),100 0,"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

  #4  
Old April 29th, 2010, 04:53 PM posted to microsoft.public.excel.worksheet.functions
JudithJubilee
external usenet poster
 
Posts: 100
Default Combine an And OR function

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

  #5  
Old April 29th, 2010, 05:04 PM posted to microsoft.public.excel.worksheet.functions
Joe User[_2_]
external usenet poster
 
Posts: 757
Default Combine an And OR function

"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

 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:27 AM.


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