How to create a list from same cells across multiple sheets in Excel?
Supposing we deploy every monthly sales table in a separated worksheet as below screen shot shown, and all sales tables have the same layout. Now we want to create a list from all sum values (Cell E6) across multiple worksheets. How to get it done? And what if create a dynamic list from sum values of each worksheet? There are two ways for you:
Recommended Productivity Tools for Excel
Office Tab: Bring powerful tabs to Office (include Excel), just like Chrome, Safari, Firefox and Internet Explorer. Save you half the time, and reduce thousands of mouse clicks for you. 30-day Unlimited Free Trial
Kutools for Excel: Save 71% of your time and solve 82% Excel problems for you. 300+ advanced tools designed for 1500+ work scenario, make Excel much easy and increase productivity immediately.60-day Unlimited Free Trial
With the following VBA code, you can create a list from the specified cells across multiple worksheets easily. You can do as follows:
Step 1: Select the specified cell that you will create your list from. In our case, we select the Cell E6.
Step 2: Press Alt + F11 keys simultaneously to open the Microsoft Visual Basic for Applications window, click Insert > Module, and then paste the following code into the module window.
VBA: Create a list from same cells across multiple sheets
Sub CreateList() Dim xAddWs As Worksheet Dim xWs As Worksheet Dim RngAddress As String xTitleId = "KutoolsforExcel" RngAddress = Application.ActiveCell.Address Set xAddWs = Application.ActiveWorkbook.Sheets.Add xAddWs.Name = xTitleId i = 1 For Each xWs In Application.ActiveWorkbook.Worksheets If xWs.Name <> xTitleId Then xAddWs.Cells(i, 1).Value = xWs.Range(RngAddress).Value i = i + 1 End If Next End Sub
Step 3: Press F5 key or click the Run button to run this VBA.
Then all values from the specified cell on all worksheets are copied to a new worksheet named KutoolsforExcel. See screen shot：
This VBA will fill the list into a new worksheet, and the values in the list are static which won’t change with the original values.
However, sometimes you may want to fill the list into specified range, and require the list values always be correspondence with the original values in specified cells all the time. To meet these needs, you should try the following method.
This method will introduce Kutools for Excel’s Dynamically Refer to Worksheets utility to create a dynamical list from same cells across multiple worksheets.
Kutools for Excel - Combines more than 300 Advanced Functions and Tools for Microsoft Excel
Step 1: Select the Range where you will fill the dynamic list, and click the Kutools > More > Dynamically Refer to Worksheets.
Step 2: In the opening Fill Worksheets References dialog box,
(1) Click the Fill Order box, and select a fill type from the drop down list. In our case, we select Fill Vertically cell after cell;
(2) In the Fill formula box, specify the cell address which you will create a dynamic list from, and then click the Lock button to lock the formula.
(3) Click the Fill Range button.
Now you will see values in the specified cells across all worksheets are filled into the specified range as below screen shot shown:
When the original values changed, the corresponding values in this specified list will be changed automatically.
Recommended Productivity Tools
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
To post as a guest, your comment is unpublished.· 9 months agoVery helpful bit of coding, saved hours of work creating a table from lots of separate data worksheets
To post as a guest, your comment is unpublished.· 2 years agoThank you very much for this. Just saved me hours of work as I had to go through 200 sheets doing data input...
One thing to note for people is to click the cell you want it to use prior to opening ip and running the macro. Scratched my head for a couple minutes as the worksheet was opening up but didn't know why the information wasn't showing