Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
=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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() Thank you, Bill! That was very clear and helpful . (I caught the "can't" early enough!) |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() "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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|