+ Reply to Thread
Results 1 to 5 of 5

Macro to copy multiple tabs into master tab

Hybrid View

  1. #1
    Registered User
    Join Date
    08-01-2018
    Location
    Canada
    MS-Off Ver
    2016
    Posts
    20

    Macro to copy multiple tabs into master tab

    Hi guys looking to create a macro that first clears data from tabs A2 – AS2 all the way down in my master tab then copies data from 3 different tabs and paste them into that master tab with all records. For this example I want to copy cell A2 – AS2 to about 20000 rows down from tabs Wine, Dinner, and Food into my master tab.

    I’ve tried creating this macro by recording it but the problem with that is the recording sticks to exact parameters. So for example if I add more records to one of my tabs the macro will paste over records.

    I need the macro to paste all records from the first tab in master then start pasting in the next blank row for the second tab as the amount of rows in my tabs will constantly be changing.

    I’m not the best at currently working with macros wondering if anyone could help. Thank you.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    04-01-2015
    Location
    The Netherlands
    MS-Off Ver
    2003/2007/2010/2016/office 365
    Posts
    880

    Re: Macro to copy multiple tabs into master tab

    Make proper use of tables. The code is not that difficult. For the columns AV:BA you will have to enter the formulas again.

    Sub VenA()
      With Sheets("Master").ListObjects(1)
        If .ListRows.Count Then .DataBodyRange.Delete
        For Each sh In Sheets
          If sh.Name <> .Parent.Name Then
            ar = sh.ListObjects(1).DataBodyRange
            .ListRows.Add.Range.Resize(UBound(ar), UBound(ar, 2)) = ar
          End If
        Next sh
      End With
    End Sub
    Attached Files Attached Files
    Messages have been translated from Dutch to English by means of google translate.

  3. #3
    Registered User
    Join Date
    08-01-2018
    Location
    Canada
    MS-Off Ver
    2016
    Posts
    20

    Re: Macro to copy multiple tabs into master tab

    Is there anyway I could keep the formulas? Basically I'm trying to create it in a way where the end user only has to push a button or two as they are not the most versed in excel.

  4. #4
    Valued Forum Contributor
    Join Date
    04-01-2015
    Location
    The Netherlands
    MS-Off Ver
    2003/2007/2010/2016/office 365
    Posts
    880

    Re: Macro to copy multiple tabs into master tab

    You only have to re-enter the formulas once. These are remembered in the table.

  5. #5
    Registered User
    Join Date
    08-01-2018
    Location
    Canada
    MS-Off Ver
    2016
    Posts
    20

    Re: Macro to copy multiple tabs into master tab

    Awesome. Thank you!

+ 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. [SOLVED] copy data from multiple tabs to one master tab
    By dylan.raymond in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-16-2020, 06:49 PM
  2. [SOLVED] How to copy data from master spreadsheet into other tabs?
    By rayted in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-11-2018, 11:40 AM
  3. copy tabs in all open files into master tab
    By ammartino44 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-28-2015, 07:10 PM
  4. Replies: 9
    Last Post: 01-16-2014, 11:28 AM
  5. Macro copy data from multiple workbooks to master
    By pram in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 03-15-2013, 03:14 PM
  6. How to copy data from 4 sheet tabs to another master one?
    By Intellectual in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-01-2012, 11:08 AM
  7. [SOLVED] macro: copy multiple workbooks to multiple tabs in single book
    By Michael in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-14-2006, 11:55 AM

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