Auto populate a sheet
Answer:
Your question is perfect for a pivot table. The problem is that you need to refresh the pivot table every time you change the data. I´ll show you how to setup the pivot table and how to make it auto refresh using vba. I will also provide an answer for how to accomplish this using only array formulas.
Example sheet "Data"
Example sheet "Pivot table"
- Select all data on Sheet "Data"
- Go to tab "Insert"
- Click "Pivot table" button
- Click "Pivot table"
- See the remaining steps in this animated gif:
Vba code to refresh pivot table every time the pivot table sheet is activated.
Private Sub Worksheet_Activate()
Sheets("Pivot table").PivotTables("PivotTable1").RefreshTable
End Sub- Right click on sheet name "Pivot table"
- Click "View Data"
- Paste code to code module
- Exit VB Editor
Example sheet "Array formula"
Array formula in cell A2:
How to create an array formula
- Select cell A2
- Paste formula
- Press and hold Ctrl + Shift
- Press Enter
How to copy array formula
- Select cell A2
- Copy (Ctrl + c)
- Select cell B2
- Paste (Ctrl +v)
- Select cell range A2:B2
- Copy (Ctrl + c)
- Select cell range A3:B15
- Paste (Ctrl +c)
Formula in cell C2:
How to copy formula in cell C2
- Select cell C2
- Copy (Ctrl + c)
- Select cell C3:C15
- Paste (Ctrl + v)
Formula in cell D2:
How to copy formula in cell C2
- Select cell D2
- Copy (Ctrl + c)
- Select cell D3:D15
- Paste (Ctrl + v)
You can make the "Array formula" sheet auto populating using dynamic named ranges instead of cell references:
Create a dynamic named range in excel
Download excel *.xlsm file
Related posts:
Disable autofit column widths for all pivot tables in a sheet
Auto refresh a pivot table in excel
Copy each sheet in active workbook to new workbooks
Tracking a stock portfolio in excel (auto update)
Excel vba: Populate a combobox with values from a pivot table





















I may be complicating so if so I apologize up front! I want to autopopulate tab 2 with select information from tab 1 if "Yes" is inut on tab 2, column A.
I have a lot of data in tab 1 but the actionable items are in tab 2 only if "Yes". I may have 50 rows in tab 1 but only need 3 rows in tab 2 and I don't need all columns in tab 1, only a few.
What is the best way to automate this process? Thank you!
William J. Ryan
Can you provide some example data from both sheets?