ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Using IF & AND and getting #NAME? (https://www.excelbanter.com/excel-worksheet-functions/157389-using-if-getting-name.html)

Amy

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!


T. Valko

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!




T. Valko

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!






T. Valko

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!






Amy

Using IF & AND and getting #NAME?
 


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

Amy

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. :-)

T. Valko

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!)





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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com