+ Reply to Thread
Results 1 to 3 of 3

Macro to create Pivot Table in Each sheet of Active Workbook

  1. #1
    Forum Contributor
    Join Date
    12-26-2015
    Location
    UAE
    MS-Off Ver
    2013
    Posts
    128

    Macro to create Pivot Table in Each sheet of Active Workbook

    Dear All,

    I am using Excel 2013.

    Further to my thread “Macro to create Database from a Table Matrix on All Sheets in a Workbook”.
    I have an issue which I am facing and would request help in this matter.

    I would like to create a Pivot Table with the Data on each Worksheet as shown in the sample attached.
    The Macro should run on each Sheet in the Active Workbook and create the Pivot Table for the data which will start after few row gaps from the main data. In current sample it is starting on Row 21 but it will not always be Row 21 so please not this point.
    The code should determine the headers of the data coming from down to up in Col A.

    The Pivot should be:
    Filters – Sheetname
    Rows - Product
    Tag
    Columns - Type
    Value - Qty
    Report Layout – Tabular (No Subtotal) – As per sample
    Pivot Style Light 1, Banded Rows – as per sample
    +/- Buttons – switch off

    IMPORTANT NOTE:
    Pivot should start on the same rows as the Headers of the database (see sample).
    I hope it is clear.
    Thanks for your time and help in advance.
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    12-26-2015
    Location
    UAE
    MS-Off Ver
    2013
    Posts
    128

    Re: Macro to create Pivot Table in Each sheet of Active Workbook

    Hello All,
    Further to my Original Thread I am enclosing herewith a sample with the Macro recorded for creating the Pivot Table for my requirement.
    I want to automate this as per my OP.

    The code should:
    1) Run on all the sheets in the active workbook.
    2) Create the Pivot Table in line with the Database which would start after the Matrix. The size of Matrix will be different in height on each sheet.
    3) Database will start in Column A after the Matrix and it will be five Cols Viz Col A to Col E.
    4) Pivot should be created in line with the Headings of the Database as shown in the sample.

    Thanks in advance for the help.
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    12-26-2015
    Location
    UAE
    MS-Off Ver
    2013
    Posts
    128

    Re: Macro to create Pivot Table in Each sheet of Active Workbook

    Dear All,
    Is this doable by a VBA code?

    TIA

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] VBA Macro to create pivot table of all sheets of a workbook
    By mfhaq77 in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 12-30-2021, 05:30 PM
  2. [SOLVED] Create Pivot Table Macro - Working In One Workbook But Not Another?
    By vwhite in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-29-2020, 10:36 AM
  3. Need VBA to Create Pivot Table from Active Sheet, all data
    By bmahfood in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-17-2019, 05:50 PM
  4. [SOLVED] Macro to create a Summary Sheet from a Pivot Table
    By rehana402003 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-02-2019, 12:39 PM
  5. How to create a macro to create a pivot table on a new sheet
    By thlee1122 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-19-2015, 11:14 AM
  6. Replies: 1
    Last Post: 08-31-2012, 09:52 PM
  7. [SOLVED] copy active sheet, create new workbook, name new workbook based on cell reference
    By jm0392 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-20-2012, 07:12 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1