Howdy, folks:
I have a series of workbooks, each within a "month" directory - for example: "Jan 11", "Feb 11" - in the format of "mmm yy". I'm looking for a way for each workbook to look to it's directory and come up with an associated date. As an example, the file within the "Mar 11" folder would look at it's location and return a date of "03/01/2011" in the format of mm/dd/yyyy. A function, perhaps? Any ideas?
TIA.
Bob
Hello Bob,
Are you saying the workbook named named "Mar 11.xls" is stored in the directory named "03/01/2011" ?
Sincerely,
Leith Ross
Remember To Do the Following....
1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.2. Thank those who have helped you by clicking the Starbelow the post.
3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
No, the directory name would be like "Mar 12" and from that name, I need to come up with "03/01/2011". The workbooks within that directory will have various names - a.xls, b.xls, etc.
Bob
Last edited by bstubbs; 12-17-2010 at 11:11 AM.
Hello Bob,
If the workbook is named "03/11/2010.xls" then you can trim the name and convert it into a date. I know how to do this in VBA for you but not sure how to do it with formulas.
Sincerely,
Leith Ross
Remember To Do the Following....
1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.2. Thank those who have helped you by clicking the Starbelow the post.
3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
It's not the workbook but the directory that has the "date formatted" name. How 'bout this: how can I come up with the current directory name using VBA?
Thanks.
Bob
Hello Bob,
The VBA code would be
Workbooks("03/11/2010").Path
Sincerely,
Leith Ross
Remember To Do the Following....
1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.2. Thank those who have helped you by clicking the Starbelow the post.
3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks