+ Reply to Thread
Results 1 to 10 of 10

How can I get a count of columns in a pivot table data area (without VBA)?

  1. #1
    Registered User
    Join Date
    01-08-2022
    Location
    Norway
    MS-Off Ver
    o365
    Posts
    5

    Question How can I get a count of columns in a pivot table data area (without VBA)?

    I am a newbie, so please bear with me!

    My pivot table expands/contracts horizontally when filters are applied.

    When you select anything from the slicer, the number of columns changes. I need a count of the number of generated data columns.

    How can I get a count of columns that have been generated in the data area of the pivot table (without VBA)?

    A thousand thanks in advance!

    Attached Files Attached Files
    Last edited by Agrajag909; 01-09-2022 at 09:40 AM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: How can I get a count of columns in a pivot table data area (without VBA)?

    Please see the yellow banner at the top of the page.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    01-08-2022
    Location
    Norway
    MS-Off Ver
    o365
    Posts
    5

    Re: How can I get a count of columns in a pivot table data area (without VBA)?

    You want me to pay for some help? I thought this was forum for people to help each other.

    Disappointed.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,920

    Re: How can I get a count of columns in a pivot table data area (without VBA)?

    NO!

    Trevor is referring to the other banner - he wants you to provide a sample workbook.
    Last edited by AliGW; 01-09-2022 at 06:47 AM.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Registered User
    Join Date
    01-08-2022
    Location
    Norway
    MS-Off Ver
    o365
    Posts
    5

    Re: How can I get a count of columns in a pivot table data area (without VBA)?

    Thank you, AliGW, but it isn't a complicated question and I don't see how providing a simple pivot table will help. I just need to find out how to get a column count from a pivot table displaying data (without VBA).

    Do you know how this number can be obtained?

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,920

    Re: How can I get a count of columns in a pivot table data area (without VBA)?

    I would also have asked for a sample workbook. I can't answer your question as it stands without seeing your pivot table - sorry.

    I don't see that it's hard for you to provide a workbook. You are the one asking for help, so really should be guided by those offering to help you.

  7. #7
    Registered User
    Join Date
    01-08-2022
    Location
    Norway
    MS-Off Ver
    o365
    Posts
    5

    Re: How can I get a count of columns in a pivot table data area (without VBA)?

    Ok, thank you. I have uploaded a sample workbook!

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,920

    Re: How can I get a count of columns in a pivot table data area (without VBA)?

    This maybe?

    =COUNTIF(D6:L6,"<>")+2

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: How can I get a count of columns in a pivot table data area (without VBA)?

    Maybe:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,920

    Re: How can I get a count of columns in a pivot table data area (without VBA)?

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

+ 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. Pivot Table - Count data From Multiple Columns
    By Ashraf1 in forum Excel General
    Replies: 21
    Last Post: 02-23-2011, 08:13 AM
  2. Text in the data area of a pivot table
    By mkvassh in forum Excel General
    Replies: 4
    Last Post: 03-12-2009, 07:26 AM
  3. Text in Data area of Pivot table
    By sreenath205 in forum Excel General
    Replies: 1
    Last Post: 01-10-2007, 08:10 AM
  4. Data Area of Pivot Table and Pivot Charts
    By Missy in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 04-12-2006, 07:55 PM
  5. Replies: 1
    Last Post: 03-20-2006, 10:15 PM
  6. [SOLVED] Pivot Table - Rounding the numbers in the Data Area
    By Shatin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-01-2005, 10:02 AM
  7. [SOLVED] How to have multiple columns in pivot table data area?
    By mitch1962 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-24-2005, 06:07 AM
  8. How to have multiple columns in pivot table data area?
    By mitch1962 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-23-2005, 10:06 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