+ Reply to Thread
Results 1 to 3 of 3

Change Year in Macro with reference to cell in Working code.

  1. #1
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Change Year in Macro with reference to cell in Working code.

    HI I have below code. I use to search for all rows from January and then copy to another sheet.
    I have this kind of macro for all months.
    I need to be able to change the year in the code from example 2013 and instead to 2014.
    I have before dont this by making a reference to a cell and put this reference in the code.
    In this case i cant make it work.
    I want to make a refernce to example cell AW1 and then type in cell 2013. Then i can change the year in the cell.

    I have tried this but it dont work.

    Please Login or Register  to view this content.
    Please have a look and see how 2013 in the code can be changed to 2014 example.

    Thanks in advance.

    Abjac

    Here is my code as it looks now.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Change Year in Macro with reference to cell in Working code.

    You were very close:

    Please Login or Register  to view this content.
    Gary's Student

  3. #3
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Re: Change Year in Macro with reference to cell in Working code.

    HI Jacobsehavn. That is true very close haha. But you code does the trick. I can now make the reference to the cell and use other macro to change year.Really Great thanks allot.
    Sincerly

    Abjac

+ 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