+ Reply to Thread
Results 1 to 6 of 6

VBA to Archive lines of data when work is complete

  1. #1
    Registered User
    Join Date
    10-26-2012
    Location
    danbury, ct
    MS-Off Ver
    Excel 2010
    Posts
    4

    VBA to Archive lines of data when work is complete

    Hi there, I have a status board that I'm trying to set up an automatic archive feature that takes a row of data and drops it into a separate archive sheet. I've gotten the code to move the data how I want, but now I need the rest of the data on the page to shift up and fill in the space.

    I have one easy problem, which is I only want it to clear the contents in that row from Column A to T (Beyond column T I have a number of formulas that run metrics in the Archive sheet.)

    And I have one not so easy problem. I need the rest of the data in columns A to T to shift up, but I can't just use .delete because I have other pages that reference the cells from this page. When I try .delete, it breaks the references in the other pages and messes up the display page. Here is the code I have so far:

    Please Login or Register  to view this content.
    Last edited by sailadayaway; 08-14-2014 at 07:56 AM.

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA to Archive lines of data when work is complete

    Maybe:

    Change:

    Please Login or Register  to view this content.
    To this:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    10-26-2012
    Location
    danbury, ct
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: VBA to Archive lines of data when work is complete

    The first half works perfectly, thanks!

    the second half uses .delete which breaks my cell references in my other sheet. I was just playing around and figured out if I copy every row below the one I just cleared and paste it one row higher it does exactly what I want it to do. What's an easy way to write that in? I would want it to copy from the next row to row 226 and paste it in the original row.

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA to Archive lines of data when work is complete

    Maybe:

    If you mean for the range.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    10-26-2012
    Location
    danbury, ct
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: VBA to Archive lines of data when work is complete

    Perfect. Thank you very much. I need to pick up a book on basic VBA and really start getting this stuff down..

  6. #6
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA to Archive lines of data when work is complete

    You're welcome. Glad to help out and thanks for the feedback. Please comply with Forum Rule No. 9.

    9. Acknowledge the responses you receive, good or bad. If your problem is solved, please say so clearly, and mark your thread as Solved: Click Thread Tools above your first post, select "Mark your thread as Solved". Or click the Edit button on your first post in the thread, Click Go Advanced, select [SOLVED] from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Dropdown option or Edit button will not appear -- ask a moderator to mark it.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Repeating macro for various worksheets to complete lines in consolidation sheet
    By RossChip in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-08-2013, 07:46 AM
  2. Help with VBA to auto archive data
    By Kayaness in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-05-2012, 01:43 AM
  3. Replies: 5
    Last Post: 10-18-2010, 08:53 AM
  4. Replies: 4
    Last Post: 09-08-2010, 11:17 AM
  5. [SOLVED] how do i sort a complete work sheet in excel
    By Jerry in forum Excel General
    Replies: 2
    Last Post: 04-26-2006, 08:55 PM

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