+ Reply to Thread
Results 1 to 6 of 6

"Pushing off" oldest data

  1. #1
    Forum Contributor dagindi's Avatar
    Join Date
    06-02-2008
    Location
    New York, NY
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    295

    "Pushing off" oldest data

    I know the title is pretty vague but I honestly couldn't find a better description.

    Attached is a sample workbook. It tracks the last 4 purchases of an item. My goal is to have a macro that "pushes" anything in the new order columns to the LAST ORDER columns, LAST ORDER column data to HISTORY 2 columns, HISTORY 2 to HISTORY 3, HISTORY 3 to HISTORY 4 and push off or delete the data in HISTORY 4.

    I put a color coded before and after on the sheet showing the movement of the data across the sheet.

    The kicker is that the code has to be row specific so that it only moves and deletes the rows that contain new orders.

    Any bit of help would be greatly appreciated!!
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    11-20-2012
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2010
    Posts
    597

    Re: "Pushing off" oldest data

    i think that should be pretty easy as long at the format doesn't ever change, ie add a History 5 or delete history 4 (although it can easily be modified if that happens, give me 10-20 mins

  3. #3
    Valued Forum Contributor
    Join Date
    11-20-2012
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2010
    Posts
    597

    Re: "Pushing off" oldest data

    Push Off Example.xlsm

    there you go, you can try it on Sheet2, I just copied the BEFORE section to that page so you can check to see if it works the way you were hoping

  4. #4
    Valued Forum Contributor rollis13's Avatar
    Join Date
    01-26-2012
    Location
    Cordenons
    MS-Off Ver
    Excel 2016 32bit - Win 11
    Posts
    935

    Re: "Pushing off" oldest data

    A little tweak to scott.s.fower's code.
    Change:
    Please Login or Register  to view this content.
    To:
    Please Login or Register  to view this content.

  5. #5
    Valued Forum Contributor
    Join Date
    11-20-2012
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2010
    Posts
    597
    You dont need to use the tweak since you may want to insert header linesif it looksfor the bold header then you can change the layout at will, but its up to u

  6. #6
    Valued Forum Contributor rollis13's Avatar
    Join Date
    01-26-2012
    Location
    Cordenons
    MS-Off Ver
    Excel 2016 32bit - Win 11
    Posts
    935

    Re: "Pushing off" oldest data

    Right, but the loop has to be stopped anyway because row 1 has merged cells and my Excel 2003 blows.
    Well, this will do to:
    Change:
    Please Login or Register  to view this content.
    To:
    Please Login or Register  to view this content.
    Last edited by rollis13; 07-06-2013 at 03:34 PM.

+ 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