Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Amy Amy is offline
external usenet poster
 
Posts: 165
Default Using IF & AND and getting #NAME?

To determine if a date falls within a time period, I created this
function, but keep getting #NAME? for the result.

=IF(AND(7/1/2005<=AE,AE<=6/30/2006),"FY2005","NA")

This function is in AF, where the result would be placed.

I will appreciate advice what is wrong or missing with this function?

Thanks!

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Using IF & AND and getting #NAME?

=IF(AND(7/1/2005<=AE,AE<=6/30/2006),"FY2005","NA")

The problem is that Excel can resolve what "AE" is.

I'm assuming that AE is meant to be a cell reference. Column AE but what
row?

Also, when using dates in comparison expressions it's easier to read and
understand if you either use the DATE function or enter the dates in cells
then refer to those cells. As you have it now the dates aren't being
evaluated as dates but rather as the math expression: 7 divided by 1 divided
by 2005 and 6 divided by 30 divided by 2006.

Let's assume AE means cell AE1.

So...

AE1 = some date

=IF(AND(AE1=DATE(2005,7,1),AE<=DATE(2006,6,30))," FY2005","NA")

Or:

A1 = 7/1/2005
B1 = 6/30/2006

=IF(AND(AE1=A1,AE<=B1),"FY2005","NA")

--
Biff
Microsoft Excel MVP


"Amy" wrote in message
...
To determine if a date falls within a time period, I created this
function, but keep getting #NAME? for the result.

=IF(AND(7/1/2005<=AE,AE<=6/30/2006),"FY2005","NA")

This function is in AF, where the result would be placed.

I will appreciate advice what is wrong or missing with this function?

Thanks!



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Using IF & AND and getting #NAME?

The problem is that Excel can resolve what "AE" is.

That should be: can't

The problem is that Excel can't resolve what "AE" is.

--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
=IF(AND(7/1/2005<=AE,AE<=6/30/2006),"FY2005","NA")


The problem is that Excel can resolve what "AE" is.

I'm assuming that AE is meant to be a cell reference. Column AE but what
row?

Also, when using dates in comparison expressions it's easier to read and
understand if you either use the DATE function or enter the dates in cells
then refer to those cells. As you have it now the dates aren't being
evaluated as dates but rather as the math expression: 7 divided by 1
divided by 2005 and 6 divided by 30 divided by 2006.

Let's assume AE means cell AE1.

So...

AE1 = some date

=IF(AND(AE1=DATE(2005,7,1),AE<=DATE(2006,6,30))," FY2005","NA")

Or:

A1 = 7/1/2005
B1 = 6/30/2006

=IF(AND(AE1=A1,AE<=B1),"FY2005","NA")

--
Biff
Microsoft Excel MVP


"Amy" wrote in message
...
To determine if a date falls within a time period, I created this
function, but keep getting #NAME? for the result.

=IF(AND(7/1/2005<=AE,AE<=6/30/2006),"FY2005","NA")

This function is in AF, where the result would be placed.

I will appreciate advice what is wrong or missing with this function?

Thanks!





  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Using IF & AND and getting #NAME?

For cryin out loud!

2 more typos:

=IF(AND(AE1=DATE(2005,7,1),AE<=DATE(2006,6,30))," FY2005","NA")

=IF(AND(AE1=DATE(2005,7,1),AE1<=DATE(2006,6,30)), "FY2005","NA")

=IF(AND(AE1=A1,AE<=B1),"FY2005","NA")

=IF(AND(AE1=A1,AE1<=B1),"FY2005","NA")

--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
=IF(AND(7/1/2005<=AE,AE<=6/30/2006),"FY2005","NA")


The problem is that Excel can resolve what "AE" is.

I'm assuming that AE is meant to be a cell reference. Column AE but what
row?

Also, when using dates in comparison expressions it's easier to read and
understand if you either use the DATE function or enter the dates in cells
then refer to those cells. As you have it now the dates aren't being
evaluated as dates but rather as the math expression: 7 divided by 1
divided by 2005 and 6 divided by 30 divided by 2006.

Let's assume AE means cell AE1.

So...

AE1 = some date

=IF(AND(AE1=DATE(2005,7,1),AE<=DATE(2006,6,30))," FY2005","NA")

Or:

A1 = 7/1/2005
B1 = 6/30/2006

=IF(AND(AE1=A1,AE<=B1),"FY2005","NA")

--
Biff
Microsoft Excel MVP


"Amy" wrote in message
...
To determine if a date falls within a time period, I created this
function, but keep getting #NAME? for the result.

=IF(AND(7/1/2005<=AE,AE<=6/30/2006),"FY2005","NA")

This function is in AF, where the result would be placed.

I will appreciate advice what is wrong or missing with this function?

Thanks!





  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Amy Amy is offline
external usenet poster
 
Posts: 165
Default Using IF & AND and getting #NAME?



Thank you, Bill! That was very clear and helpful . (I caught the "can't"
early enough!)


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Amy Amy is offline
external usenet poster
 
Posts: 165
Default Using IF & AND and getting #NAME?



"T. Valko" wrote:

For cryin out loud!

2 more typos:

=IF(AND(AE1=DATE(2005,7,1),AE<=DATE(2006,6,30))," FY2005","NA")

=IF(AND(AE1=DATE(2005,7,1),AE1<=DATE(2006,6,30)), "FY2005","NA")

=IF(AND(AE1=A1,AE<=B1),"FY2005","NA")

=IF(AND(AE1=A1,AE1<=B1),"FY2005","NA")

--
Biff
Microsoft Excel MVP


Got it. :-)
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Using IF & AND and getting #NAME?

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Amy" wrote in message
...


Thank you, Bill! That was very clear and helpful . (I caught the "can't"
early enough!)



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



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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"