+ Reply to Thread
Results 1 to 3 of 3

I need to copy the information of several tables to a master table

  1. #1
    Registered User
    Join Date
    09-17-2013
    Location
    Calgary, Canada
    MS-Off Ver
    Excel 2010
    Posts
    2

    I need to copy the information of several tables to a master table

    Hello Everybody

    I am trying to develop a macro that creates a master table based on the information found on several tables. The source tables are located in different spreadsheets within the same workbook and the contain information that is both numerical and text. The problem for me is that not all the tables have the same number of rows but they have the same number of columns.
    My biggest problem is to create the appropriate loops that navigate through the table until the last row is copy and the move to the next sheet to start with the new table. I have all the tables located in the same position in each spreadsheet. I thing my biggest problem is that I am not good at developing the cycles... I need help please ....

    This is what I currently have.

    Sub Macro7()
    '
    Dim i As Integer
    Dim j As Integer
    Dim Loop1 As Integer
    Dim DWRG As CellFormat

    i = Sheets("Drawing_12").Range("B6").Range + 1
    j = Sheets("Drawings_12").Range("B16").Range - 1

    For Loop1 = i To j

    'DRWG is the drawing number that is associated with a particular table

    Sheets("12_TEST").Range("DWRG").Select
    Selection.Copy
    Sheets("MAsterBOM").Select
    Range("B16").Select
    Sheets("MAsterBOM").Paste

    'Sheets("12_TEST").Range("$B$5:$N$16").AutoFilter Field:=1, Criteria1:="=BORN", _
    Operator:=xlAnd

    Activelcell.Value = Start_Cell
    i = 1
    DoAnother:
    Sheets("MAsterBOM").Cell.Offset(i, 0) = ActiveCell.Offset(i, 0).Value
    i = i + 1
    If i < 16 Then GoTo DoAnother Else Exit Sub
    Next Loop1

    End Sub

    Thanks a lot !!

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: I need to copy the information of several tables to a master table

    Please Login or Register  to view this content.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    09-17-2013
    Location
    Calgary, Canada
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: I need to copy the information of several tables to a master table

    Hello Oeldere

    I am not sure yet if the code you suggested will work for me. I will be trying to accommodate it to my particular situation and will let you know.

    Thank you very much for your reply !

    Cheers

+ 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. Replies: 4
    Last Post: 08-16-2013, 05:45 PM
  2. [SOLVED] Creating a Master table from several smaller tables
    By brharrii in forum Excel General
    Replies: 14
    Last Post: 07-19-2013, 10:19 AM
  3. [SOLVED] Macro to copy paste Tables to Master sheet
    By dawnmau in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-02-2013, 06:48 PM
  4. Macro - Create smaller word tables from master excel table
    By VBA_n00b in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-22-2011, 10:12 PM
  5. Replies: 7
    Last Post: 12-22-2008, 04:13 PM

Tags for this Thread

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