Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 78
Default IF, AND, OR Function

Hello,

I have successfully created the IF / AND function on the following formula:

=IF(AND(A1="Feb 08",B1="Persons Name"),"Clear","Not Clear")

however, when I want to ad another condition to the "AND" part (as below),
the formula stops.

=IF(AND(A1="Jan 08",A1="Feb 08",B1="Persons Name"),"Clear","Not Clear")

do i need to ad an "OR" if I do, where in the formula do I ad it?

Many thanks
Tracey


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default IF, AND, OR Function

The way you have written this you want A1 to be both Jan 08 and Feb 08
- clearly it can't be both at the same time. Try it this way:

=IF(AND(OR(A1="Jan 08",A1="Feb 08"),B1="Persons Name"),"Clear","Not
Clear")

Hope this helps.

Pete

On Nov 12, 10:30*am, Tracey wrote:
Hello,

I have successfully created the IF / AND function on the following formula:

=IF(AND(A1="Feb 08",B1="Persons Name"),"Clear","Not Clear")

however, when I want to ad another condition to the "AND" part (as below),
the formula stops.

=IF(AND(A1="Jan 08",A1="Feb 08",B1="Persons Name"),"Clear","Not Clear")

do i need to ad an "OR" if I do, where in the formula do I ad it?

Many thanks
Tracey


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default IF, AND, OR Function

Hi,

Try this

=IF(AND(OR(A1="Jan 08",A1="Feb 08"),B1="Persons Name"),"Clear","Not Clear")

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Tracey" wrote in message
...
Hello,

I have successfully created the IF / AND function on the following
formula:

=IF(AND(A1="Feb 08",B1="Persons Name"),"Clear","Not Clear")

however, when I want to ad another condition to the "AND" part (as below),
the formula stops.

=IF(AND(A1="Jan 08",A1="Feb 08",B1="Persons Name"),"Clear","Not Clear")

do i need to ad an "OR" if I do, where in the formula do I ad it?

Many thanks
Tracey


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default IF, AND, OR Function

AND(A1="Jan 08",A1="Feb 08",...) would always be false, as A1 cannot be
equal to both values.
I assume that you probably mean =IF(AND(OR(A1="Jan 08",A1="Feb
08"),B1="Persons Name"),"Clear","Not Clear")
--
David Biddulph


"Tracey" wrote in message
...
Hello,

I have successfully created the IF / AND function on the following
formula:

=IF(AND(A1="Feb 08",B1="Persons Name"),"Clear","Not Clear")

however, when I want to ad another condition to the "AND" part (as below),
the formula stops.

=IF(AND(A1="Jan 08",A1="Feb 08",B1="Persons Name"),"Clear","Not Clear")

do i need to ad an "OR" if I do, where in the formula do I ad it?

Many thanks
Tracey




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 78
Default IF, AND, OR Function

Fantastic!!!

thank you!!!!

"Pete_UK" wrote:

The way you have written this you want A1 to be both Jan 08 and Feb 08
- clearly it can't be both at the same time. Try it this way:

=IF(AND(OR(A1="Jan 08",A1="Feb 08"),B1="Persons Name"),"Clear","Not
Clear")

Hope this helps.

Pete

On Nov 12, 10:30 am, Tracey wrote:
Hello,

I have successfully created the IF / AND function on the following formula:

=IF(AND(A1="Feb 08",B1="Persons Name"),"Clear","Not Clear")

however, when I want to ad another condition to the "AND" part (as below),
the formula stops.

=IF(AND(A1="Jan 08",A1="Feb 08",B1="Persons Name"),"Clear","Not Clear")

do i need to ad an "OR" if I do, where in the formula do I ad it?

Many thanks
Tracey





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default IF, AND, OR Function

On Wed, 12 Nov 2008 02:30:05 -0800, Tracey
wrote:

Hello,

I have successfully created the IF / AND function on the following formula:

=IF(AND(A1="Feb 08",B1="Persons Name"),"Clear","Not Clear")

however, when I want to ad another condition to the "AND" part (as below),
the formula stops.

=IF(AND(A1="Jan 08",A1="Feb 08",B1="Persons Name"),"Clear","Not Clear")

do i need to ad an "OR" if I do, where in the formula do I ad it?

Many thanks
Tracey


What do you mean by "the formula stops" ?

What, exactly, are you trying to do?

In words, your AND function requires that

A1 = "Jan 08" AND A1 = "Feb 08"

Since A1 cannot be equal to two things at the same time, this must always
evaluate to FALSE.

If you want the condition to be TRUE if A1 equals "Jan 08" OR if A1 equals "Feb
08", then you need to state that.

You will find it helpful to write out exactly what you want in words.

You might wind up with:

AND(OR(a1="Jan 08",a1="Feb 08"),B1="Persons Name")

--ron
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 78
Default IF, AND, OR Function

Thank you!

:)

"Ashish Mathur" wrote:

Hi,

Try this

=IF(AND(OR(A1="Jan 08",A1="Feb 08"),B1="Persons Name"),"Clear","Not Clear")

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Tracey" wrote in message
...
Hello,

I have successfully created the IF / AND function on the following
formula:

=IF(AND(A1="Feb 08",B1="Persons Name"),"Clear","Not Clear")

however, when I want to ad another condition to the "AND" part (as below),
the formula stops.

=IF(AND(A1="Jan 08",A1="Feb 08",B1="Persons Name"),"Clear","Not Clear")

do i need to ad an "OR" if I do, where in the formula do I ad it?

Many thanks
Tracey


  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 78
Default IF, AND, OR Function

Thank you very much!

:)

"Pete_UK" wrote:

The way you have written this you want A1 to be both Jan 08 and Feb 08
- clearly it can't be both at the same time. Try it this way:

=IF(AND(OR(A1="Jan 08",A1="Feb 08"),B1="Persons Name"),"Clear","Not
Clear")

Hope this helps.

Pete

On Nov 12, 10:30 am, Tracey wrote:
Hello,

I have successfully created the IF / AND function on the following formula:

=IF(AND(A1="Feb 08",B1="Persons Name"),"Clear","Not Clear")

however, when I want to ad another condition to the "AND" part (as below),
the formula stops.

=IF(AND(A1="Jan 08",A1="Feb 08",B1="Persons Name"),"Clear","Not Clear")

do i need to ad an "OR" if I do, where in the formula do I ad it?

Many thanks
Tracey



  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default IF, AND, OR Function

You are welcome

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Tracey" wrote in message
...
Thank you!

:)

"Ashish Mathur" wrote:

Hi,

Try this

=IF(AND(OR(A1="Jan 08",A1="Feb 08"),B1="Persons Name"),"Clear","Not
Clear")

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Tracey" wrote in message
...
Hello,

I have successfully created the IF / AND function on the following
formula:

=IF(AND(A1="Feb 08",B1="Persons Name"),"Clear","Not Clear")

however, when I want to ad another condition to the "AND" part (as
below),
the formula stops.

=IF(AND(A1="Jan 08",A1="Feb 08",B1="Persons Name"),"Clear","Not Clear")

do i need to ad an "OR" if I do, where in the formula do I ad it?

Many thanks
Tracey


  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default IF, AND, OR Function

You're welcome, Tracey - thanks for feeding back.

Pete

On Nov 12, 10:55*am, Tracey wrote:
Thank you very much!

:)

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 06:28 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"