+ Reply to Thread
Results 1 to 11 of 11

Macros to copy datas from different excel document to one worksheet

  1. #1
    Registered User
    Join Date
    01-15-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    9

    Macros to copy datas from different excel document to one worksheet

    I am trying to copy datas from different excel document and paste it to fist sheet of a new document.

    I managed with a macro but unfortunately i am getting few problems in that. Pasted below the macro which i am using

    Please Login or Register  to view this content.
    When i execute this macro the output is like the first column get copied from the first document and first two lines copies from second document and first 4 lines get copies from the third document.

    I have pasted a sample data.

    Help me out with this.
    Attached Files Attached Files
    Last edited by arlu1201; 02-08-2013 at 12:13 PM. Reason: Use Code tags

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

    Re: Macros to copy datas from different excel document to one worksheet

    Updated code -
    Please Login or Register  to view this content.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    01-15-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Macros to copy datas from different excel document to one worksheet

    When i executed you updated macro i am getting a error stating

    Runtime error 1004 Application defined error or object defined error.

    When i debug the error it points out ".Range("A2:U" & Range("A" & Rows.Count).End(x1Up).Row).Copy _
    Master.Worksheets(1).Range("A" & Rows.Count).End(x1Up).Offset(1, 0)" this line

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

    Re: Macros to copy datas from different excel document to one worksheet

    You dont even have that code line in your above code.

    Try the code i posted in post 2 and let me know if you get any errors.

  5. #5
    Registered User
    Join Date
    01-15-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Macros to copy datas from different excel document to one worksheet

    I copied you whole macros and pasted it. after which i got this error
    Please Login or Register  to view this content.
    Last edited by arlu1201; 02-08-2013 at 12:37 PM. Reason: Use code tags

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

    Re: Macros to copy datas from different excel document to one worksheet

    Replace
    Please Login or Register  to view this content.
    with
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    01-15-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Macros to copy datas from different excel document to one worksheet

    Thanks!!!

    I have pasted your updated macro but when i execute it nothing happened.


    Attached the document after running the macros and the sample records.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    01-15-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Macros to copy datas from different excel document to one worksheet

    arul help me!!!!!

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

    Re: Macros to copy datas from different excel document to one worksheet

    Updated code -
    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    01-15-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Macros to copy datas from different excel document to one worksheet

    Thanks its working now

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

    Re: Macros to copy datas from different excel document to one worksheet

    Am glad its solved.

+ 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