Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: Parse value out of string for later use

  1. #1
    New Member
    Join Date
    Feb 2002
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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. #2
    MrExcel MVP Aladin Akyurek's Avatar
    Join Date
    Feb 2002
    Location
    The Hague, NL
    Posts
    83,635
    Post Thanks / Like
    Mentioned
    33 Post(s)
    Tagged
    6 Thread(s)

    Default



    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. #3
    New Member
    Join Date
    Feb 2002
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Worked like a charm. Thanks!

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •