+ Reply to Thread
Results 1 to 5 of 5

Macro to change date list

  1. #1
    Forum Contributor
    Join Date
    10-24-2008
    Location
    England
    Posts
    146

    Macro to change date list

    Hi i have a list of dates from A1 to A31 , say in january 2009. from the 1st to the 31st, Im trying to get a macro that when i run it it removes all these dates and replaces them with feburarys dates 1st to the 28th. run the macro again and it changes the dates to march etc etc.

    How is this possible please?

    So many thanks
    Last edited by Directlinq; 02-20-2009 at 03:33 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Macro to change date list

    One way:

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    10-24-2008
    Location
    England
    Posts
    146

    Re: Macro to change date list

    I feel really stupid asking this but i cant for the life of me figure out how to make this work when my date list is between A5 and A35. It works perfectly if my first date is in A1.

    Please Login or Register  to view this content.
    Many Thanks
    Last edited by Directlinq; 02-20-2009 at 03:30 AM.

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Macro to change date list

    Please encase VBA in CODE Tags (use the # icon) -- please edit your last post and update.

    To answer your question and to make the system more flexible let's alter the approach:

    Please Login or Register  to view this content.
    If you need to alter the range going forward you merely need to alter the A5:A35 statement (mindful of course that the above assumes the date range to always be vertical).

  5. #5
    Forum Contributor
    Join Date
    10-24-2008
    Location
    England
    Posts
    146

    Re: Macro to change date list

    Thank you works great

+ 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