C
chickooooos
Hi
I have a cell with a julian date code written as below in A1:
3-365 (Formatted as General).
Where 3 represent year 2003 and 365 represent 365th day from 1st of Jan. For
a validation purpose I need to make sure when someone enter a 3-366 (366 not
possible as 2003 is not a leap year), it shows an error message.
I have in B1 (formatted as Date) following formula.
B1 ="1-Jan-200"&LEFT(A1,1)
to display the January 1st of the year entered.
On C1 (formatted as Number) I have the another formula to to check the year
is a leap year and accordingly put maximum days allowed
C1 = IF(MOD(YEAR(B1),4)=0,366,365)
D1 = MID(A1,3,3) (to extract the date part say 366 If A1 is 3-366)
formatted as number
E1 = D1>C1
E1 is giving a incorrect results. Consider following scenario:
A1 = 3-200
then
B1 = 1-Jan-2003
C1 = 365
D1 = 200
E1 = TRUE
Where as E1 should be FALSE. IF I enter 200 directly in D1, it displays
FALSE, but not when the formula MID(A1,3,3) evaluate to 200!
Can someone explain this?
TIA
I have a cell with a julian date code written as below in A1:
3-365 (Formatted as General).
Where 3 represent year 2003 and 365 represent 365th day from 1st of Jan. For
a validation purpose I need to make sure when someone enter a 3-366 (366 not
possible as 2003 is not a leap year), it shows an error message.
I have in B1 (formatted as Date) following formula.
B1 ="1-Jan-200"&LEFT(A1,1)
to display the January 1st of the year entered.
On C1 (formatted as Number) I have the another formula to to check the year
is a leap year and accordingly put maximum days allowed
C1 = IF(MOD(YEAR(B1),4)=0,366,365)
D1 = MID(A1,3,3) (to extract the date part say 366 If A1 is 3-366)
formatted as number
E1 = D1>C1
E1 is giving a incorrect results. Consider following scenario:
A1 = 3-200
then
B1 = 1-Jan-2003
C1 = 365
D1 = 200
E1 = TRUE
Where as E1 should be FALSE. IF I enter 200 directly in D1, it displays
FALSE, but not when the formula MID(A1,3,3) evaluate to 200!
Can someone explain this?
TIA