+ Reply to Thread
Results 1 to 4 of 4

creating a pivot table, missing data

  1. #1
    Registered User
    Join Date
    01-08-2015
    Location
    UK
    MS-Off Ver
    2003
    Posts
    9

    creating a pivot table, missing data

    Hello,

    I'm trying to create a pivot table in a new workbook. The only data is one column, 38 rows long, listing months (coppied from another wb). I'm trying to create a pivot table that counts the number of times each month appears:

    This is the code I've got (lifted from a recorded macro). When I was recording the macro, it worked. But running the code creates a pivot table with one row that counts the number of entries in the range, not making any differentiation between values.
    I'm new to using Pivot Tables in VBA. Any ideas?

    Please Login or Register  to view this content.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: creating a pivot table, missing data

    Hi,

    Please upload the workbook so that we can see the apparent problem in context.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    01-08-2015
    Location
    UK
    MS-Off Ver
    2003
    Posts
    9

    Re: creating a pivot table, missing data

    Thanks for the reply Richard. I managed to find some code online that's solved it. I'm not sure why it works and my code didn't though.

    The credit for the code goes to:
    http://stackoverflow.com/questions/1...mic-data-range

    The code that works in case anyone else is searching for the same problem and needs it:

    Please Login or Register  to view this content.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: creating a pivot table, missing data

    ..and thanks for posting the solution you found.

+ 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. Creating a Pivot table from exsisting data
    By pfournier80 in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 12-16-2012, 12:44 PM
  2. Creating a Pivot Table for a Data Set
    By SarahB2 in forum Excel Charting & Pivots
    Replies: 13
    Last Post: 08-09-2012, 01:39 AM
  3. pivot table-missing pivot table field list
    By sowmyav in forum Excel General
    Replies: 1
    Last Post: 01-08-2009, 02:29 PM
  4. [SOLVED] Excel 2007 (BETA) Missing data when doing pivot table
    By ademoore in forum Excel General
    Replies: 1
    Last Post: 07-08-2006, 07:10 AM
  5. pivot table - two colums of data are missing
    By JJ in forum Excel General
    Replies: 1
    Last Post: 08-04-2005, 03:05 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