+ Reply to Thread
Results 1 to 8 of 8

Move a Record to Archive

  1. #1
    Forum Contributor
    Join Date
    04-02-2008
    Location
    Jacksonville Beach, Florida
    MS-Off Ver
    Microsoft Excel 2003 and 2010
    Posts
    264

    Move a Record to Archive

    On the attached, what would be the proper VBA code for 'when cell E6 is not blank, cut the total record (A6:E6) and paste it to the next available row on the Archive tab'?

    Adding how to re-sort cells A3:E7 on the "Input Log" tab by Name (the data1 field) so there is then not a blank would be even better!

    Thanks a lot in advanced.
    Attached Files Attached Files
    Last edited by dreicer_Jarr; 02-14-2011 at 11:01 PM.
    ______________________________________
    "Vision without Execution is a Hallucination"
    Edison

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Move a Record to Archive

    Are you adding one record at a time from the input sheet, why only copy Row ^ when you have more data there?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Contributor
    Join Date
    04-02-2008
    Location
    Jacksonville Beach, Florida
    MS-Off Ver
    Microsoft Excel 2003 and 2010
    Posts
    264

    Re: Move a Record to Archive

    Yes, we would be adding one row at a time. I am not sure what the symbol ^ means, but we only want a row record copied IF the cell in column E is populated. Notice the example row is the only one with something in E that's populated.

    How is else can I clarify my quesiton? Thanks for your help!

  4. #4
    Forum Contributor
    Join Date
    04-02-2008
    Location
    Jacksonville Beach, Florida
    MS-Off Ver
    Microsoft Excel 2003 and 2010
    Posts
    264

    Smile Re: Move a Record to Archive

    Can I clarify the question any further? I thought this one would be simpe for some, but I guess I am wrong!

  5. #5
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Move a Record to Archive

    Hi dreicer_Jarr, See if the attached and this code does what you need.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  6. #6
    Forum Contributor
    Join Date
    04-02-2008
    Location
    Jacksonville Beach, Florida
    MS-Off Ver
    Microsoft Excel 2003 and 2010
    Posts
    264

    Re: Move a Record to Archive

    It worked perfect except it lead me to another issue. The attached is an example but the "input log" tab has a formula that is now losing its reference. This is likely because an entire row is being deleted and not just a range. Any ideas on how this can be avoided or fixed? I edited the solved example to make this easier. The macro would need to run without there being any errors in the data6 column.

    Thanks again all!
    Attached Files Attached Files
    Last edited by dreicer_Jarr; 02-14-2011 at 08:48 PM.

  7. #7
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Move a Record to Archive

    Try adding three lines of code to put the formula back like:
    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    04-02-2008
    Location
    Jacksonville Beach, Florida
    MS-Off Ver
    Microsoft Excel 2003 and 2010
    Posts
    264

    Re: Move a Record to Archive

    For those that read this in the future, the second problem I asked about was solved by me changing the formula to =row() that way the reference is always correct. The first question I asked was answered perfectly above. Thanks!

+ 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