+ Reply to Thread
Results 1 to 3 of 3

Pivot Table Macro not populate fields as recorded

  1. #1
    Forum Contributor
    Join Date
    07-17-2015
    Location
    Roanoke, Virginia
    MS-Off Ver
    2010
    Posts
    173

    Pivot Table Macro not populate fields as recorded

    Recorded a macro for a pivot table - when I ran it gave an error - at .Position = 2

    The attached DOCX shows what the fields should be and what it shows

    Any help to revise this is greatly appreciated.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Pivot Table Macro not populate fields as recorded

    Hi,

    You need to swap these two parts around
    Please Login or Register  to view this content.
    so that the data field is added first thus
    Please Login or Register  to view this content.
    If you don't do it in that order, adding the field again as a data field moves it from the row area to the data area because the field caption is the same. When you add it as a data field first, the caption is "Count of Same Address" and not "Same Address" so the move doesn't occur.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Forum Contributor
    Join Date
    07-17-2015
    Location
    Roanoke, Virginia
    MS-Off Ver
    2010
    Posts
    173

    Re: Pivot Table Macro not populate fields as recorded

    Perfect! Thanks
    Jim

+ 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 pivot table with Recorded Macro
    By oneillp1 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-07-2014, 10:00 AM
  2. [SOLVED] URGENT.. Recorded Pivot Table Macro error
    By nawGo in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-15-2014, 11:14 AM
  3. [SOLVED] Recorded Pivot Table Macro Doesn't Do What I Recorded!
    By diakonos1984 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-26-2013, 11:01 AM
  4. [SOLVED] Error in a recorded macro to create Pivot Table
    By aadeshgandhi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-21-2012, 12:40 PM
  5. User form to populate fields of Report/pivot table
    By jasniya in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-16-2011, 05:39 AM
  6. Recorded macro for Pivot Table
    By jackman in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-12-2009, 05:16 PM
  7. Recorded Macro with Pivot table
    By Eladamri in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-31-2008, 09:04 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