+ Reply to Thread
Results 1 to 14 of 14

Move Row Data to another sheet in same workbook

  1. #1
    Registered User
    Join Date
    07-16-2013
    Location
    Tampa FL
    MS-Off Ver
    Excel 2010
    Posts
    8

    Move Row Data to another sheet in same workbook

    Hi Everyone.

    I need to create a workbook for tracking sales. Based on the content of the first row (an X) I need to move the entire row starting with Sales Person name to another sheet. The first three rows will indicate which sheet the data needs to move to and in some cases it may have to go to 2 sheets. I have attached the file I am starting with.

    thanks for any help provided.
    Attached Files Attached Files

  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: Move Row Data to another sheet in same workbook

    Maybe:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    07-16-2013
    Location
    Tampa FL
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Move Row Data to another sheet in same workbook

    John.

    I am not a VBA expert. Is there anyway you can insert in my excel sheet and provide that to me?

    Thanks.

  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: Move Row Data to another sheet in same workbook

    I don't have 2010, but I do know that you have to goto File>Options>Customize Ribbon>Right hand side>Main Tabs>Developers Tab>On the Developers Tab Choose VB Editor>select your project>From the VBE Menu>Insert Module>Copy and Paste the above code there. You will then be able to run it from the Macros listed in the Developers Tab.

  5. #5
    Registered User
    Join Date
    07-16-2013
    Location
    Tampa FL
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Move Row Data to another sheet in same workbook

    Ok, I did that. Am getting subscript out of range.

    Provide me it in office 2003. I have that on another computer will try it.

  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: Move Row Data to another sheet in same workbook

    Tools>Macro>Visual Basic Editor>Lefthand side choose your Project and insert module. Normally, a subscript out of range indicates Excel can't find either a Sheet Object or Workbook Object. Check the sheet names in the code and see if they match the ones in your workbook.

  7. #7
    Registered User
    Join Date
    07-16-2013
    Location
    Tampa FL
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Move Row Data to another sheet in same workbook

    Ok!. That seemed to work. Now for the last question. Can I get this macro to run as the data is entered or will I have to run the macro manually. I would prefer either hitting a button or as I finish a row it reviews and populates the other sheets.

    Thoughts?

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

    Re: Move Row Data to another sheet in same workbook

    You can assign the macro to a Button in 2010 or in 2003 you also have the additional option of attaching it too a current menu.

  9. #9
    Registered User
    Join Date
    07-16-2013
    Location
    Tampa FL
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Move Row Data to another sheet in same workbook

    Also, one more thing.

    I need the macro to over write the sheets. As it sits right now it appends the data which gives me duplicate entries. Since I will be updating this weekly, I would prefer it over writes each time.

    Possible?

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

    Re: Move Row Data to another sheet in same workbook

    Maybe:

    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    07-16-2013
    Location
    Tampa FL
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Move Row Data to another sheet in same workbook

    Thanks John, it works as advertised. Working on the button thing, but the code is exactly as needed.

  12. #12
    Registered User
    Join Date
    07-16-2013
    Location
    Tampa FL
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Move Row Data to another sheet in same workbook

    Sorry one more thing. The macro replaces my headers in the other sheets with blanks, how can I make my header stay on the other sheets?

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

    Re: Move Row Data to another sheet in same workbook

    Try:

    Please Login or Register  to view this content.

  14. #14
    Registered User
    Join Date
    07-16-2013
    Location
    Tampa FL
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Move Row Data to another sheet in same workbook

    John. Another question. How can I have each sheet have a different header that is static.
    So first line is header and 2nd line would have the column headings and data would start on 3rd line.

    Thanks for the help.

+ 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. Move data rows from multiple sheets to a master sheet in another workbook
    By Nick_WBA in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-14-2012, 03:28 PM
  2. move selection from a sheet to new workbook
    By nickm687 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-23-2007, 12:26 PM
  3. Replies: 1
    Last Post: 02-14-2006, 04:55 PM
  4. [SOLVED] How can I move a sheet to the end of the workbook in VB?
    By Jon Davie in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-05-2006, 05:50 PM
  5. I would like to move from sheet to sheet in a workbook using keybo
    By k-cess in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 04-11-2005, 11:06 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