+ Reply to Thread
Results 1 to 6 of 6

Determine number of row field items under given data field

  1. #1
    Registered User
    Join Date
    12-21-2006
    MS-Off Ver
    Office 2013
    Posts
    73

    Determine number of row field items under given data field

    I have a large pivot table with multiple row fields and what I am trying to do is return the number of "Locations" under a given "Model". Is this possible in VBA?

    Using the picture below as a reference, I would want to return 4 for Armani Ex and 8 for Burberry.

    pivottable.jpg

    Thank you!

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Determine number of row field items under given data field

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    12-21-2006
    MS-Off Ver
    Office 2013
    Posts
    73

    Re: Determine number of row field items under given data field

    I tried to create a sample workbook but even with using a minimal amount of information I wasn't able to bring the file size under the 1 mb limit.

    I think that my previous description of what I am looking for should be sufficient.

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Determine number of row field items under given data field

    An example is a good way to go.

    The empy cells also need to be counted?
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  5. #5
    Registered User
    Join Date
    12-21-2006
    MS-Off Ver
    Office 2013
    Posts
    73

    Re: Determine number of row field items under given data field

    I don't need empty cells, just looking to see if there is VBA syntax to return the count of a specific set of fields. Referring to the picture attached in my original post, I'm looking for a way to return the number of locations under a specific model.

    IE:
    Under "Armani Ex", the returned amount would be 4 for Gramercy, League City, Texas City and (blank).
    Under "Burberry", the returned amount would be 8 for Exxon Mobil, Galveston, Gramercy, Katy, League City, Texas City, The Woodlands and (blank).

    I know you can use code to return the overall amount of fields for a specific row field, but I'm looking to narrow it down to specific models. What I basically want is to know how many different locations a specific frame model is at. I'm aware of the Distinct Count function but I ran into issues using the Data Model approach to I had to revert to the non-Data Model.

    I also understand you can use formula's to return the info but that way takes forever with the data sample I am using so I'd prefer to not have to resort to that method.

  6. #6
    Registered User
    Join Date
    12-21-2006
    MS-Off Ver
    Office 2013
    Posts
    73

    Re: Determine number of row field items under given data field

    bump, still need help with this please

+ 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. Replies: 6
    Last Post: 12-07-2014, 06:59 PM
  2. Hidden field with text, number, to show there is something in field
    By Bilal93 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 09-09-2014, 10:50 AM
  3. need to parse out a field with multiple items in field
    By rde55cae in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-25-2014, 10:28 PM
  4. Replies: 0
    Last Post: 06-26-2012, 09:06 PM
  5. [SOLVED] determine a classification of a mixed letter/number code field
    By Jason210 in forum Excel General
    Replies: 3
    Last Post: 06-22-2012, 02:21 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