You are here:

Excel/Master Tab in a workbook


I am using Office 2013. I have a workbook that I am tracking the work orders for all of my departments in. I would like a master tab that pulls all of the information from 4 tabs onto one tab and is sorted by the job # in Column A. The master would not be used to input on only as an overview. Each department has its own tab that they enter in the job information, they use columns A-AF and the header row is the same in all. There are 4 tabs they are named R,S,I,M. I have 2 other tabs that pull pivot tables that I need the master to ignore. I need this to automatically update after new information is added to each tab. Are you able to help me with this?

This is actually pretty simple, this macro goes in the sheet module of the sheet will serve as the master.  Right-click that tab and select "View Code", then paste in this code to the VBA module that appears.

Sub Worksheet_Activate()
Dim ws As Worksheet

Application.ScreenUpdating = False

For Each ws In Sheets(Array("R", "M", "I", "S"))
    ws.UsedRange.Offset(1).Copy Me.Range("A" & Rows.Count).End(xlUp).Offset(1)
Next ws

Range("A1").CurrentRegion.Sort Range("A2"), xlAscending, Header:=xlYes
Application.ScreenUpdating = True

End Sub

Then close the vbeditor and save your workbook as a macro-enabled workbook, the extension would probably be .xlsm.

Now, anytime you bring the master sheet up onscreen it will refresh, that is it will clear its current contents then copy in all the data from the four sheets listed in the macro, then sort by column A.
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here


All Answers

Answers by Expert:

Ask Experts


Jerry Beaucaire


Excel Formulas, macros, automation. Microsoft Excel MVP - 2010. Code site with free code snippets and techniques:


Microsoft Excel MVP - 2010. I have my own extensive Excel help/code site: ===================== I have been offering free assistance as an Excel aid on many web sites for many years: ( - JBeaucaire) ======== ( - JBeaucaire) ======= ( - jbeaucaire)

Bachelor's Degree from Azusa Pacific University in Mathematics and Music Composition

Awards and Honors
Microsoft Excel MVP 2010

©2017 All rights reserved.

[an error occurred while processing this directive]