+ Reply to Thread
Results 1 to 14 of 14

two spreadsheets, how do I copie information from one to another.

  1. #1
    Forum Contributor
    Join Date
    05-18-2012
    Location
    Chicopee, Ma
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    196

    two spreadsheets, how do I copie information from one to another.

    I have two spread sheets, one uses a macro to move rowes to an archive file. The other spreadsheet is set up for job costing information.
    The rows that get archived in the first spreadsheet have some information that I would like to copy to the costing spreadsheet. ie: work order number, descriotion, date issued and date closed.
    Is ther a way to do this through a formula?
    If so can you show me an example?

    Thanks

    Matt
    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: two spreadsheets, how do I copie information from one to another.

    Why not incorporate it into the current macro?

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    05-18-2012
    Location
    Chicopee, Ma
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    196

    Re: two spreadsheets, how do I copie information from one to another.

    Do I have to attache the June Spreadsheet to Reised test run? or just have the two open?

  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: two spreadsheets, how do I copie information from one to another.

    I just tested it with them both opened. If you want to incorporate the June spreadsheet then the code will have too be changed to reflect that.

  5. #5
    Forum Contributor
    Join Date
    05-18-2012
    Location
    Chicopee, Ma
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    196

    Re: two spreadsheets, how do I copie information from one to another.

    I tried the code, but it would not work for me.

  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: two spreadsheets, how do I copie information from one to another.

    What did not work? How did you run it. Note the name change. Were both workbooks open?

  7. #7
    Forum Contributor
    Join Date
    05-18-2012
    Location
    Chicopee, Ma
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    196

    Re: two spreadsheets, how do I copie information from one to another.

    Yes both were open.
    I copied the code and pasted to the macro
    Runtime error "9" I think

  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: two spreadsheets, how do I copie information from one to another.

    Which line is highlighted?

  9. #9
    Forum Contributor
    Join Date
    05-18-2012
    Location
    Chicopee, Ma
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    196

    Re: two spreadsheets, how do I copie information from one to another.

    runtime error 9
    subscrip out of range

  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: two spreadsheets, how do I copie information from one to another.

    Run the code from the VBE. When it errors, which line is highlighted?

  11. #11
    Forum Contributor
    Join Date
    05-18-2012
    Location
    Chicopee, Ma
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    196

    Re: two spreadsheets, how do I copie information from one to another.

    ActiveSheet.Cells(ActiveCell.Row, 2).Copy Workbooks("June[1].xls").Sheets("Sheet1").Range("A" & Rows.Count).End(3)(2)

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

    Re: two spreadsheets, how do I copie information from one to another.

    On testing I can't reproduce the error. On your sample files Workbook June[1] has a Sheet1. Does the current one have a Sheet1? Is June[1] an xls or xlsx? That might be the reason.

  13. #13
    Forum Contributor
    Join Date
    05-18-2012
    Location
    Chicopee, Ma
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    196

    Re: two spreadsheets, how do I copie information from one to another.

    it's June.xls not June [1].xls

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

    Re: two spreadsheets, how do I copie information from one to another.

    Does it work when you change the June[1] to June in the code?

+ 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