+ Reply to Thread
Results 1 to 8 of 8

Copying from multiple wkshts into one wrksht using a loop for endof row for each wkst

  1. #1
    Registered User
    Join Date
    05-01-2011
    Location
    Charlotte, NC
    MS-Off Ver
    Excel 2010
    Posts
    9

    Copying from multiple wkshts into one wrksht using a loop for endof row for each wkst

    Hi I am wondering if someone could help me with a soloution. I have a workbook that has specific data feeding from various other workbook (using linked formulas). Within this workbook (my master workbook) I need to create a copy of all the worksheets (not the menue sheet or the cmd sheet) into one master sheet. However since each worksheet has a formula I cannot use a vba to find the end of the sheet, however I could use application count if row does not equal "", to count to the end of each row.

    I have attached a test workbook for your review. I am not sure if I am explaining my issue correctly.

    Thank you
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    01-01-2005
    MS-Off Ver
    2007
    Posts
    368

    Re: Copying from multiple wkshts into one wrksht using a loop for endof row for each wkst

    Hi,

    If I were you I woul rather work with tables instead of lists!

    Paste the following in a module and try it:

    Please Login or Register  to view this content.
    Elio Fernandes

  3. #3
    Registered User
    Join Date
    05-01-2011
    Location
    Charlotte, NC
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Copying from multiple wkshts into one wrksht using a loop for endof row for each wkst

    Hi I tried pasting this and running it however it gave me an error of Run time error 104 Application-defined or object-defined.

  4. #4
    Registered User
    Join Date
    01-01-2005
    MS-Off Ver
    2007
    Posts
    368

    Re: Copying from multiple wkshts into one wrksht using a loop for endof row for each wkst

    Open VB editor and run cpyDataFrom_Test_to_Master step-by-step pressing F8 to see where the error is.


    See attached file.
    Attached Files Attached Files
    Last edited by efernandes67; 03-16-2013 at 07:43 PM.

  5. #5
    Registered User
    Join Date
    05-01-2011
    Location
    Charlotte, NC
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Copying from multiple wkshts into one wrksht using a loop for endof row for each wkst

    Hi i got the macro to run but because I am using links to other worksheet it is only picking up the first tab and everything else is blank. After stepping throug the the code it seems as if first copy the formulas then convert it to paste values.

  6. #6
    Registered User
    Join Date
    05-01-2011
    Location
    Charlotte, NC
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Copying from multiple wkshts into one wrksht using a loop for endof row for each wkst

    I have tried modifying my sheets and I am still getting some blank rows an not all rows are pulling in some will some will not. I do not know if is becasue there is a formula in each row and the code is only looking at A:A for blank instead of looking at all the columns in the array as blank. I am stumped.

  7. #7
    Registered User
    Join Date
    01-01-2005
    MS-Off Ver
    2007
    Posts
    368

    Re: Copying from multiple wkshts into one wrksht using a loop for endof row for each wkst

    I attached the file with the code and it is running!!! If your file is as the one you posted, I think it should work. If you want, post your actually file and I will take a look.
    Last edited by efernandes67; 03-17-2013 at 05:32 AM.

  8. #8
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Copying from multiple wkshts into one wrksht using a loop for endof row for each wkst

    If you want a simple consolidation, try the attached.
    Attached Files Attached Files

+ 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