+ Reply to Thread
Results 1 to 9 of 9

Recorded Macro not functioning properly

  1. #1
    Forum Contributor
    Join Date
    10-16-2012
    Location
    Brooklyn
    MS-Off Ver
    Excel 2010 PC
    Posts
    137

    Recorded Macro not functioning properly

    Hi.
    I've recently recorded this macro to change dates like "JAN 13" to a "JAN 2013" format. I recorded this macro using find and replace and I achieved the desired result.
    When I run the recorded macro, the date "JAN 13" is changed to "JAN 202013"

    I can't figure out why this is or how to fix it. I tried searching by columns but that didn't work. Can anyone tell me what went wrong?

    Thanks.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by Trevasaurus; 01-29-2013 at 05:58 PM. Reason: File Upload

  2. #2
    Forum Contributor thameem127's Avatar
    Join Date
    04-06-2012
    Location
    Jeddah,Saudi Arabia
    MS-Off Ver
    Excel 2003,Excel 2007
    Posts
    321

    Re: Recorded Macro not functioning properly

    upload file

  3. #3
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Recorded Macro not functioning properly

    Try this. Change the "mmm yyyy" date format to suit.

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    10-16-2012
    Location
    Brooklyn
    MS-Off Ver
    Excel 2010 PC
    Posts
    137

    Re: Recorded Macro not functioning properly

    Hey AlphaFrog

    I tried adding the number format to the bottom of my code but it's still creating extended years, i.e. 202013.
    I'm watching the code go through and it does what I want first, then it goes through and changes all the 2013's & 2014's to 202013 & 202014.
    My actual macro goes out to the year 2027. I don't know if that has anything to do with my problem.

  5. #5
    Forum Contributor
    Join Date
    10-16-2012
    Location
    Brooklyn
    MS-Off Ver
    Excel 2010 PC
    Posts
    137

    Re: Recorded Macro not functioning properly

    I've noticed that my problem stops if I end my macro before the year 2020.

  6. #6
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Recorded Macro not functioning properly

    Try this...

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor thameem127's Avatar
    Join Date
    04-06-2012
    Location
    Jeddah,Saudi Arabia
    MS-Off Ver
    Excel 2003,Excel 2007
    Posts
    321

    Re: Recorded Macro not functioning properly

    try this code

    Please Login or Register  to view this content.
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    10-16-2012
    Location
    Brooklyn
    MS-Off Ver
    Excel 2010 PC
    Posts
    137

    Re: Recorded Macro not functioning properly

    @ Alphafrog.

    That works perfectly. And it's a lot faster than my initial approach. Thanks a lot.

  9. #9
    Forum Contributor thameem127's Avatar
    Join Date
    04-06-2012
    Location
    Jeddah,Saudi Arabia
    MS-Off Ver
    Excel 2003,Excel 2007
    Posts
    321

    Re: Recorded Macro not functioning properly

    Press star @ Alphafrog

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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