+ Reply to Thread
Results 1 to 3 of 3

Macro code assistance to edit the year in multiple cells.

  1. #1
    Valued Forum Contributor
    Join Date
    03-17-2007
    Location
    Michigan
    MS-Off Ver
    Excel 2016
    Posts
    957

    Macro code assistance to edit the year in multiple cells.

    Greetings! I'm looking for assistance that would via a macro change the year affiliated with dates in row 1; cells D1 through BM1 for whatever requested year the user wants. As well as any dates in column A, from A2 down. If a cell is blank it would remain blank. This macro should only apply to the specific worksheet intended and not alter any other worksheets in the workbook. Ideally I'd like to have a separate macro for January, and a separate one for February, March, etc. , but the February would only work for the February named tab, etc. The macro cannot affect the month and day specified, but just the year.

    Ideally each year I would start a new year out using a blank version of the previous years workbook but would need to convert manually each date, which takes forever as my main workbook has a sheet for each month. I've attached a very small version/sample workbook, for anyone willing to offer assistance.

    Thanks to anyone willing to assist!
    Attached Files Attached Files
    Last edited by lilsnoop; 11-29-2012 at 11:19 PM.

  2. #2
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Macro code assistance to edit the year in multiple cells.

    Hi, Lilsnoop
    Try to select the first row on your worksheet and run the macro:
    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor
    Join Date
    03-17-2007
    Location
    Michigan
    MS-Off Ver
    Excel 2016
    Posts
    957

    Re: Macro code assistance to edit the year in multiple cells.

    Thanks nilem! 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