+ Reply to Thread
Results 1 to 4 of 4

Limiting history backed up to 4 years.

  1. #1
    Registered User
    Join Date
    06-06-2007
    Posts
    54

    Limiting history backed up to 4 years.

    Hello everyone, I have been working on this project for quite a bit, and I thought I was done, however I would like to make a bit of a revision, so if anyone could help that would be wonderful.

    Currently, when the macro is run, it copies and special pastes the history to the side |2000|2001|2002|2003|... and so on and so on. This after a while, will cause the workbook to grow to a considerable size therefor, If possible, i would like to limit it to 4 years. The easiest way would probably be to put it in the form |2003|2002|2001|2000| and when the year gets updated simply drop of the last year |2004|2003|2002|2001|.

    Hopefully this makes sense. The current code can be seen below
    Please Login or Register  to view this content.

    I have also included a zipped file of what one of the sheets would look like to give you a visual reference (obviously this is missing the other 30 pages as well as the macro, so if anyone would like me to attach a more complete version, I would be happy to.

    Hopefully someone could help me out.
    Any help is really appreciated.

    Thanks
    -Ben-
    Attached Files Attached Files

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Okay so I gave it a whirl....

    see if it works for your needs.

    Note: I opted for the 2nd option:
    The easiest way would probably be to put it in the form |2003|2002|2001|2000| and when the year gets updated simply drop of the last year |2004|2003|2002|2001|
    You may have to re-arrange any "starting data" and you should first copy|paste special values any ranges with formulas...so that existing numbers do not get skewed.

    Make sure Your latest set of history starts in column I...per your sample

    Please Login or Register  to view this content.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    06-06-2007
    Posts
    54
    Hmmm, for some reason it is not limiting the years to only 4. It just keeps adding on. So its almost there.

    Thanks a bunch.

    -Ben-

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    For me it's working nicely...

    My code counts items in Row 4 of the History section...if there are 4 it will delete the old section (3 columns).

    This is the code that does that:

    Please Login or Register  to view this content.

+ 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