+ Reply to Thread
Results 1 to 7 of 7

Changing the year of dates in a column

  1. #1
    Registered User
    Join Date
    02-07-2012
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    17

    Changing the year of dates in a column

    I've created a column of 500+ dates that all read "mm/dd". They are 2012 dates, but I'd like to change them all to 2010 dates. Any ideas?
    Last edited by darpodo; 02-29-2012 at 12:55 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: Changing the year of dates in a column

    If they're true dates, you should be able to just do a global replace (Replace All) changing 2012 to 2010


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Contributor darknation144's Avatar
    Join Date
    01-24-2012
    Location
    London
    MS-Off Ver
    Microsoft Excel 365 MSO
    Posts
    555

    Re: Changing the year of dates in a column

    Ctrl+F > Then find 2012 replace with 2010

  4. #4
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Changing the year of dates in a column

    Do a Find...Replace changing 2012 for 2010.

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: Changing the year of dates in a column

    I guess that's agreed then ...

    And three answers all with the same time stamp within 5 minutes!

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Changing the year of dates in a column

    Try
    =IF(A1> "2/28/2012"+0, A1-731, A1-730)
    If you have a 2012 date of 02/29 it will become 02/28/2010
    Does that work for you?

    Edit: Making it more complicated than necessary as usual.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: Changing the year of dates in a column

    @ChemistB: overcomplicated, yes ... correct, also yes.

    The solutions provided using a global change will work, or appear to work, for all dates. However, any dates for 29/02/2012 will change to 29/02/2010 and will be a text value, not a true date.

    Regards, TMS

+ 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