+ Reply to Thread
Results 1 to 5 of 5

Excel 2007 : Cut and paste a date from the end of a cell into next cell, repeat for column

  1. #1
    Registered User
    Join Date
    02-17-2012
    Location
    Wales
    MS-Off Ver
    Excel 2007
    Posts
    6

    Cut and paste a date from the end of a cell into next cell, repeat for column

    I need to cut a date **/**/****, which is the last bit of info in the cells in a column and paste it into the corresponding cell in the next cloumn. E.g. Cell G1 contains "Construction Skills Operative 25/01/2012", I need to cut 25/01/2012 and paste it in H1, then repeat this for every populated cell in column G and paste the date in the corresponding cell in column H. Pleas can someone help

  2. #2
    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
    53,048

    Re: Cut and paste a date from the end of a cell into next cell, repeat for column

    You can do this in a 3-step process.

    1st extract the date into the cell you want it, using...=RIGHT(g1,10)
    2nd remove the date into a helper column using...=REPLACE(A2,LEN(A2)-10,11,"")
    3rd convert the 2 new cols to values and clean up the helper and "G" col
    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

  3. #3
    Registered User
    Join Date
    02-17-2012
    Location
    Wales
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Cut and paste a date from the end of a cell into next cell, repeat for column

    Quote Originally Posted by FDibbins View Post
    You can do this in a 3-step process.

    1st extract the date into the cell you want it, using...=RIGHT(g1,10)
    2nd remove the date into a helper column using...=REPLACE(A2,LEN(A2)-10,11,"")
    3rd convert the 2 new cols to values and clean up the helper and "G" col
    Thanks for that the firt two lines work really well. I don't undrstand what you're asking me to do in the 3rd line though?

    I inserted an xtra col next to G
    I then put in your code in line 1 (wjich gave me a col just the dates)
    I inserted another extra col next to G
    I then put in your code in line 2 (wjich gave me a col words less the dates)

    Construction Skills Operative Construction Skills Operative 19/11/2013
    Construction Skills Operative Construction Skills Operative 05/09/2013
    Construction Skills Operative Construction Skills Operative 17/03/2013
    Construction Skills Operative Construction Skills Operative 26/05/2008
    Construction Skills Operative Construction Skills Operative 03/02/2012
    Construction Skills Operative Construction Skills Operative 04/05/2012
    Construction Skills Operative Construction Skills Operative 29/06/2011
    Construction Skills Operative Construction Skills Operative 09/11/2011

    How do i get rid of one of the first 2 columns without messing up the brilliant code you gave me?
    I assume thats what your saying to do in your line 3 but I don't understand? Could you spell it out for me please?

  4. #4
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,651

    Re: Cut and paste a date from the end of a cell into next cell, repeat for column

    As per your query in #1, just type this in H1:
    =RIGHT(G1,10)
    Copy down

    If you want it to be date format so can be calculated :
    =--RIGHT(G1,10)
    Format as date
    Copy down
    Quang PT

  5. #5
    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
    53,048

    Re: Cut and paste a date from the end of a cell into next cell, repeat for column

    hilight the 2 new columns and copy (ctrl c), then paste as values to themselves ((paste special/values). This will replace the formulas with theur values instead.

    Then you can delete the original data

+ Reply to 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