VBA Combining Data and Create Pivot

unknownymous

Board Regular
Joined
Sep 19, 2017
Messages
182
Office Version
  1. 2016
Platform
  1. Windows
Hello Gurus,

Hope you are doing well despite the pandemic. I was wondering if you have any idea on how to code this:

1. I have a worksheet with 5 tabs or more (may vary). The headers are same (see below):

NumberNameSales DivDataNote
1SamSA100
2AmyFA90

2. I want to create a tab named as "Consolidated" by combining the data of all tab available on the same worksheet.
3. In the Consolidated tab, there will be additional column whereas the tab name is indicated for reference.

Example:

NumberNameSales DivDataNoteTab Name
1SamSA100Sheet 1
2AmyFA90File 101
3RonTP100Subject 01

4. Lastly, a Pivot will be created by getting the Tab Name and Sum of Data from the Data column

Tab Name (Row Name)Sum of Data
Subject 101100
Sheet 1100
File 10190
Grand Total290

Any thoughts will be much appreciated.
 

Some videos you may like

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

Watch MrExcel Video

Forum statistics

Threads
1,122,631
Messages
5,597,282
Members
414,134
Latest member
Snowfall

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top