![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Feb 2002
Posts: 7
|
Right now, I am trying to create a macro which will pull the date out of a string of text found in a cell and save the workbook the value of the cell in A1 plus the date.
So, for instance, I have the following text in cells A1 and A2, respectively: Total Education Structure Build Time:02/15/2002 04:57:00 AM What I would like to do is to save the file as "Total Education 02.15.02" (note the date format I'd like to save the file as is slightly different than that of the formatting in the original cell). I know how to save a file with the value of cell A1 from one of your other articles, so I guess my question is, how can I parse the date out of cell A2 into a variable so that I can use it when saving the workbook? |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,314
|
In C1 enter: =A1&TEXT(RIGHT(B1,LEN(B1)-SEARCH(":",B1))+0," mm.dd.yy") where A1 houses values like "Total Education" and B1 values like "Structure Build Time:02/15/2002 04:57:00 AM". Copy down the formula as far as needed. |
|
|
|
|
|
#3 |
|
New Member
Join Date: Feb 2002
Posts: 7
|
Worked like a charm. Thanks!
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|