date from sheet name
Slight amendment, CELL("filename") refers to the active sheet, which isn't
always desirable. Use CELL("filename",A1) instead
"Steve Dunn" wrote in message
...
Here we go (another monster):
=IF((LEN(CELL("filename"))-FIND("]",CELL("filename")))5,
RIGHT(CELL("filename"),LEN(CELL("filename"))-FIND("]",
CELL("filename"))),DATEVALUE(RIGHT(CELL("filename" ),
LEN(CELL("filename"))-FIND("]",CELL("filename"))-3)&" "&
LEFT(RIGHT(CELL("filename"),LEN(CELL("filename"))-
FIND("]",CELL("filename"))),3)&" "&YEAR(TODAY())))
Month name must always be 3 letters, but day numbers can be 1 or 2 digits.
HTH
Steve D.
"Steve Dunn" wrote in message
...
Another possibility. This one relies on sheet names always having two
digits for the day(s) of the month, and the month always being 3 letters.
e.g. Jan01, Jan01-02
=IF(LEFT(RIGHT(CELL("filename"),3),1)="-",RIGHT(CELL("filename"),8),
DATEVALUE(RIGHT(CELL("filename"),2)&" "&
LEFT(RIGHT(CELL("filename"),5),3)&" "&YEAR(TODAY())))
I'll play around with it a bit to allow for single digit days.
"JBoulton" wrote in message
...
I'd like to turn a sheet name into a date.
Apr28 to 4/28/10 (as a date)
and
Apr28-30 to Apr28-30 (as text)
TIA and thanks for any ideas.
Jim
|