View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom[_2_] Peo Sjoblom[_2_] is offline
external usenet poster
 
Posts: 964
Default extract characters from filename

Assuming that this is US date format, assuming there will always be 2
character each for month and day


=--TEXT(MID(CELL("filename",A1),FIND("xls",CELL("file name",A1))-5,4)&"08","00\/00\/00")

format as date


btw, how do you know it is 2008

--


Regards,


Peo Sjoblom

"Steve" wrote in message
...
I need a formula which will extract the last 4 characters from a file
name (before the extension). I would then need to convert this to the
proper date format if possible. For example, if the file name is
09291005.xls, I would want to extract the "1005", and have that become
the date, "10/05/2008. Is it possible to format a cell so that it
shows the date in this way, after extracting the information from the
filename?

Thanks in advance for any assistance...

---
Steve