+ Reply to Thread
Results 1 to 4 of 4

Changing Pivot Table Field Values

  1. #1
    Forum Contributor
    Join Date
    09-22-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Office 2019
    Posts
    309

    Changing Pivot Table Field Values

    Hi

    The code below produced a nice Pivot Table for me but all the data in the data field "Number of Heats won against" comes out as a "Value" meaning any number is shown as "1" rather than the actual number. How do I get the Field Value for "Number of Heats won against" to be "Max" please??

    Please Login or Register  to view this content.

    Cheers

    Frankie

  2. #2
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Changing Pivot Table Field Values

    Frankie, for MAX, check out the .Function property of the PivotField, e.g.:

    Please Login or Register  to view this content.
    However, it sounds as though your source values may not be stored as numbers, or at least that field contains some non-numeric values
    (if all values were numeric the datafield would default to SUM as opposed to COUNT)

  3. #3
    Forum Contributor
    Join Date
    09-22-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Office 2019
    Posts
    309

    Re: Changing Pivot Table Field Values

    Hi XLent

    Thanks for the response. However, when I put your code into my code it throws up "Run-time error 438. Object doesn't support this property or method" with de-bug highlighting .Orientation = xlDataField.

    The "Number of Heats won against" column the data is being taken from is all numbers from 0 to 4 (at the moment although it could be any number) and are coming out in the PT as "COUNT".

    The PT its self shows all the Team names in xlRowField but does have a (Blank) line at the end of the list of names with nothing in that row but this doesn't show in the PT if I change the Range in
    Please Login or Register  to view this content.
    from ("Y:AE") to ("Y1:AE50"). But the run-time error persists. (The Range really needs to be variable as the number of teams in the list changes)

    Any ideas why please?

    Frankie

  4. #4
    Forum Contributor
    Join Date
    09-22-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Office 2019
    Posts
    309

    Re: Changing Pivot Table Field Values

    HA!! Cracked it!!

    Please Login or Register  to view this content.
    That works. Thanks for the input XLent. Put me on the right track!

    Frankie

+ 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. changing field name in pivot table
    By stephme55 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-12-2016, 01:41 PM
  2. [SOLVED] A pivot table field calculated using other field values as fields?
    By chrisf78 in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 05-07-2015, 03:08 AM
  3. Pivot Table field show values as % of another value field
    By amotto11 in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 02-27-2015, 04:31 PM
  4. Changing multiple value field setting in Pivot table
    By flarwood in forum Excel General
    Replies: 5
    Last Post: 06-13-2012, 08:33 AM
  5. pivot table- changing field
    By Abroza in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-13-2009, 04:09 AM
  6. Changing Pivot Table Field Names Using VBA
    By k_excel in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-17-2009, 12:46 PM
  7. [SOLVED] Changing Pivot Table Field Name
    By Carmen in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-30-2005, 08:05 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