+ Reply to Thread
Results 1 to 2 of 2

Macros for create a Pivot on changing data

  1. #1
    Registered User
    Join Date
    02-03-2018
    Location
    Manchester, UK
    MS-Off Ver
    2013
    Posts
    76

    Macros for create a Pivot on changing data

    Hello,

    I'm new to writing code but I'm looking at automating tasks at work. Currently, we run a report each morning and download the data into Excel. The data always has the same number of columns, but the row numbers always change. One day it could be 135,000, the next it could be 140,000.

    I have to spend five minutes generating a pivot and formatting the data.

    What code do I use when selecting a changing number of rows?

    It's a small project I'm doing in my spare time to automat a lot of Excel tasks at work.

    Thanks for your help,

    Lee.

  2. #2
    Forum Expert
    Join Date
    04-01-2013
    Location
    East Auckland
    MS-Off Ver
    Excel 365
    Posts
    1,343

    Re: Macros for create a Pivot on changing data

    normally i define a named range like "Mydata" and enter that as the data source for the pivot.
    then write some code to say something like

    Please Login or Register  to view this content.
    and run it after each import of data
    (in this case I assume the pivot data is in columns A to Z and starts at row 1, and the data sheet is active)
    If you want something done right... find a forum and ask an online expert.

    Time flies like an arrow. Fruit flies like a banana.

+ 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. Create pivot table for each worksheet in a separate workbook using macros?
    By zed369 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-04-2019, 08:12 PM
  2. Create a list of row items from a changing pivot table
    By bnels in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-18-2017, 06:51 AM
  3. [SOLVED] Making multiple macros work together & not changing existing data
    By jscalem in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-18-2015, 12:24 PM
  4. Replies: 0
    Last Post: 03-10-2015, 03:34 PM
  5. Errors to Create Pivot Charts using Macros
    By merreena in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-24-2010, 10:47 PM
  6. Replies: 1
    Last Post: 12-31-2009, 11:13 AM
  7. Using Macros to create pivot tables - query re last row
    By chubbycheeks in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-12-2006, 09:15 AM

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