+ Reply to Thread
Results 1 to 4 of 4

Want to change the dates in selected cells manually using a MACRO

  1. #1
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Want to change the dates in selected cells manually using a MACRO

    Dear Forum,

    I am working on a database which has been used and mis-used by several ex-employees each one adding his own date format which has a resulted in a big issue now...

    There are three dates and which have different formats like "mm/dd/yyyy" also "dd/mm/yyyy" and some other formats too..

    I tried changing the dates using formulas but in vain...since this date is a vital aspect of this databases tampering with it is too risky...

    So , i have to manually change each date after checking and confirming it with another inter portal..

    On most occassions the dates are mentioned as "dd/mm/yyyy" which need to be changed manually by changing the position of the first 2 characters to move in between and the 4,5th character of the dates to replace the 1,2 character and this has to be done over more than 5000 rows and 2 columns...

    The second column also has the same date except that the logic in this second column is that this is a date which three years - 1 day away from the first date.

    Ex: 1st date is mentioned incorrectly as - 07/06/2013 which is actually 6-Jun-13...and the second date will be 5-Jun-16.. ( Y+3, D - 1) where Y- Years & D is Days.

    Well the reason of doing manually is to avoid any errors in case of any other format than specified..

    So, I want someone to help me with a macro which can work on a selected range of data for two columns..

    The end format I want is make the dates read "6-Jun-13" which any layman can understand..

    Regards
    e4excel

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Want to change the dates in selected cells manually using a MACRO

    Were the dates actually input incorrectly? or are the dates technically correct, but are displaying incorrectly?
    Can you post some examples of Is and Should Be?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Want to change the dates in selected cells manually using a MACRO

    Dear Ron,

    There seems to be a Double Post which i realised now due to bad net speed...
    Anyways i have put a sheet in the other post.

    http://www.excelforum.com/excel-prog...g-a-macro.html

    Regards
    e4excel

  4. #4
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Bump No response

    Bump No response

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Change order of selected cells with macro
    By abjac in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-21-2013, 06:28 AM
  2. Replies: 2
    Last Post: 08-28-2011, 02:39 AM
  3. Code to change color and value in calendar cells based on selected dates
    By John74 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-18-2010, 02:01 PM
  4. Move contents of manually selected cell
    By nebb in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-22-2009, 11:20 PM
  5. macro to white out (to change a font in selected cells)
    By Abi in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-03-2005, 05:06 PM

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