Closed Thread
Results 1 to 4 of 4

Transforme date from "from Friday 4 to Sunday 6 January" to "2013-01-04" and "2013-01-06"

  1. #1
    Registered User
    Join Date
    12-27-2012
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    8

    Transforme date from "from Friday 4 to Sunday 6 January" to "2013-01-04" and "2013-01-06"

    Hi,

    I have the following problem:

    I have dates in this format "from Friday 4 to Sunday 6 January 2013". I need to work on it to get the followings:

    "2013-01-04" in one column
    "2013-01-06" in another column

    I was thinking to use the following formulas:

    - LEFT, to get "from Friday 4"
    - MID, to get "to Sunday 6 January 2013"
    - eliminate somehow "from Friday" and "to Sunday"

    I will remain with a cell with "4" and a cell with "6 January 2013"

    - apply an IF formula, for example: IF 4<6, then add the same month of the 2nd cell to the 1st cell, otherwise pick the month after
    - using another IF, for the years

    I don't have any idea as to how I can do it.

    Many thanks for your precious help in advance!

    Sarah

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,726

    Re: Transforme date from "from Friday 4 to Sunday 6 January" to "2013-01-04" and "2013-01-

    Can you give an example where the dates span from one month to another, eg from 30th Jan to 4th Feb - how will this appear?

    Pete

  3. #3
    Forum Expert
    Join Date
    12-24-2004
    Location
    Sweden
    Posts
    1,256

    Re: Transforme date from "from Friday 4 to Sunday 6 January" to "2013-01-04" and "2013-01-

    If all text follow this pattern:
    Go to Menu: Data > Text To Columns
    Use your formula and the =Date() formula.
    //Ola

    Attach a sample if you need more help.
    Mark the problem as Solved under the Yellow bar up Top right, under Thread Tools, when you received a solution.
    It saves time, to skip already solved threads.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Transforme date from "from Friday 4 to Sunday 6 January" to "2013-01-04" and "2013-01-

    Welcome to the Forum, unfortunately:

    This is a duplicate post and as such does not comply with Rule 5 of our forum rules. This thread will now be closed, you may continue in your other thread.

    http://www.excelforum.com/excel-form...10#post3066910

    Thread Closed.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1