+ Reply to Thread
Results 1 to 11 of 11

Extract Info from 1 sheet to the next

  1. #1
    Registered User
    Join Date
    07-28-2010
    Location
    Chambersburg, PA, USA
    MS-Off Ver
    Excel 2010
    Posts
    39

    Extract Info from 1 sheet to the next

    Here's what I think I want, I would like to click a button to move certain information from one sheet to the next. I've attached an example with the 2 sheets and cell references of which I'll need. Idea being data entry and calculation on one sheet then information stored and archived for a period of time to generate some reports on later so each entry you would copy and paste on to another and then you would clear the page and do it again.
    Attached Files Attached Files

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Extract Info from 1 sheet to the next

    This is the code that you can use. Just copy it over to the Module. Open the excel file, click on Alt+F11. In the VBE Editor, right click on Microsoft Excel Objects. Then Insert -> Module. Copy the code and save.

    I have even included the code to clear the cells in the "Entry" tab for the next person's information. The formulae fields will be untouched.

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    07-28-2010
    Location
    Chambersburg, PA, USA
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: Extract Info from 1 sheet to the next

    I receive an error on this line...
    Please Login or Register  to view this content.
    Not sure what to do next.

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Extract Info from 1 sheet to the next

    What is the error you are getting? I had tested it before providing it to you and it worked perfectly.

  5. #5
    Registered User
    Join Date
    07-28-2010
    Location
    Chambersburg, PA, USA
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: Extract Info from 1 sheet to the next

    Run-time error '1004': Application-defined or Oject-defined error
    This is the error message that I have received.

  6. #6
    Registered User
    Join Date
    07-28-2010
    Location
    Chambersburg, PA, USA
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: Extract Info from 1 sheet to the next

    Could it be the difference between Excel Versions? This work book was written to run in 2003 but it was all built in 2007. Again I'm a noob just a thought.

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Extract Info from 1 sheet to the next

    A good place to start is to unmerge all of your merged cells.
    Entia non sunt multiplicanda sine necessitate

  8. #8
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Extract Info from 1 sheet to the next

    I created the macro in 2007 and ran it in 2007 and it works perfectly. I am not sure why you should get the object defined error. The code resides in a module right?
    Last edited by arlu1201; 10-16-2011 at 06:43 AM.

  9. #9
    Registered User
    Join Date
    07-28-2010
    Location
    Chambersburg, PA, USA
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: Extract Info from 1 sheet to the next

    Quote Originally Posted by arlu1201 View Post
    I created the macro in 2007 and ran it in 2007 and it works perfectly. I am not sure why you should get the object defined error. The code resides in a module right?
    Yes, it is installed in a module.

  10. #10
    Registered User
    Join Date
    07-28-2010
    Location
    Chambersburg, PA, USA
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: Extract Info from 1 sheet to the next

    If I open the workbook exactly as I sent it to you and pasted in the code and ran it, it works fine. But if I got into the "archive" tab and remove the information back to a state of having nothing but the headers that is when I receive the error. If I input data back into the archive manually then try to run it, it seems to work. Sorry but thats the best explanation I can give.

  11. #11
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Extract Info from 1 sheet to the next

    Ok. I got your issue. I have modified the code a bit. You can use this. It works perfectly in the archive tab even if you leave just the header there.

    Please Login or Register  to view this content.

+ 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