VBA Combining Data and Create Pivot

unknownymous

Board Regular
Joined
Sep 19, 2017
Messages
249
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.
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.

Forum statistics

Threads
1,214,649
Messages
6,120,728
Members
448,987
Latest member
marion_davis

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
Back
Top