+ Reply to Thread
Results 1 to 9 of 9

Moving data from sheet1 to sheet2 and deleting sheet1 data

  1. #1
    Registered User
    Join Date
    05-16-2013
    Location
    New England
    MS-Off Ver
    Excel 2003
    Posts
    3

    Moving data from sheet1 to sheet2 and deleting sheet1 data

    I have Excel 2007 and I need help to move data from sheet1 to sheet2 and deleting data from sheet1.
    I have worksheet1 with customer, production, shipping etc. Once an order has been completed I want to delete if from sheet1 and transfer the information to sheet2 so that I have an ongoing record of what was completed. The first 3 rows are a frozen header and I’m using columns A thru AA, and rows 4 thru 3000. Upon completion of an order I would like to place an “x” in column A and have the transfer take place, moving all remaining data up to fill the deleted cells and placing the transferred data on sheet2 by moving all previously transferred data down one row and placing new transferred data into row 4.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Moving data from sheet1 to sheet2 and deleting sheet1 data

    Right-click on the sheet tab and select VIEW CODE, then paste in this event code:

    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Moving data from sheet1 to sheet2 and deleting sheet1 data

    Hi RDodd,

    Here's an Event Procedure that seems to be what you want:

    Please Login or Register  to view this content.
    Directions for running the routine(s) just supplied

    Copy the code to the clipboard

    Open your Workbook


    Press ALT + F11 to open the Visual Basic Editor.

    Select “Sheet1” from the Insert menu

    Type "Option Explicit" then paste the code under it

    and you're ready to go
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  4. #4
    Registered User
    Join Date
    05-16-2013
    Location
    New England
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Moving data from sheet1 to sheet2 and deleting sheet1 data

    Thanks for the replies. I’ve tried both and neither worked. I can’t help but think there is something going on preventing the macro from working. I had another modified event code that worked for a day and then I added a few more formulas in the spreadsheet, and it quit working. I then delete the original event code and tried it again with no success. Then my plead for help.

  5. #5
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Moving data from sheet1 to sheet2 and deleting sheet1 data

    Hi Rdodd,

    Try running:
    Please Login or Register  to view this content.
    Then both my and Jerry's code should work!

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Moving data from sheet1 to sheet2 and deleting sheet1 data

    Opening the Developer tab on the ribbon and unclicking the DESIGN MODE button should also get your macros running again.

  7. #7
    Registered User
    Join Date
    05-16-2013
    Location
    New England
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Moving data from sheet1 to sheet2 and deleting sheet1 data

    Started with fresh worksheet and both codes worked.
    A big thanks, you've saved me a huge amount of time

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Moving data from sheet1 to sheet2 and deleting sheet1 data

    Glad to hear. I've marked this thread as SOLVED for you.
    Next time, select Thread Tools from the links above and mark this thread as SOLVED. Thanks.

  9. #9
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Moving data from sheet1 to sheet2 and deleting sheet1 data

    Glad you got it running

+ 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