+ Reply to Thread
Results 1 to 14 of 14

2007 PivotTable and filter on multiple values

  1. #1
    Registered User
    Join Date
    06-18-2009
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    33

    2007 PivotTable and filter on multiple values

    I have generated a PIVOT table and it has field called "Current Handler".

    The complete "Current Handler" list has more than 200 names and I want to filter on my team member's name. The names of my team members are available in "Team List" sheet in the same workbook.

    If the "Current Handler" is a single name, then I can solve the issue using macro record operation and it seems to work fine also.

    1. There are some cases where "Current Handler" is a combination of several names (generally not exceeding 5, but lets not be limited by this)
    2. When multiple names are present in "Current Handler", the names may or may not all belong to my team (Team List sheet in same work book)

    The problem
    How to select all the names that belong to my team irrespective of whether they are standalone or exist as as combination of names?

    Thanks.
    Last edited by NBVC; 11-23-2011 at 09:08 AM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: 2007 PivotTable and filter on multiple values

    Isn't there an option in the filter list to select "Contains"? Click the drop down, select Label Filters, then Contains.. and enter your team name....
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    06-18-2009
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    33

    Re: 2007 PivotTable and filter on multiple values

    Quote Originally Posted by NBVC View Post
    Isn't there an option in the filter list to select "Contains"? Click the drop down, select Label Filters, then Contains.. and enter your team name....
    After I have created the pivot, this filter option is not there. I can always select manually my team members' name, but since the list is very long, I want to automate the process.

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: 2007 PivotTable and filter on multiple values

    In that column you want to filter, is there an entry in every row?

  5. #5
    Registered User
    Join Date
    06-18-2009
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    33

    Re: 2007 PivotTable and filter on multiple values

    I think I didnt explain the problem clearly... I will try again...
    Create a pivot from source data and there is a pivot field called "Current Handler"... it contains a list of names (more than 500 names)... each entry in this can contain multiple individual names...

    Now, I have another sheet and it contains the list of my team members...

    so, now I want to select all names where my team members exisit from pivot "Current Handler"...

    My office IT policy does not allow me to upload the sheet, else I would have shared the sample data. :-(

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: 2007 PivotTable and filter on multiple values

    You may need VBA to do that... and I, unfortunately, am not the one to provide a good VBA solution.. hopefully somebody will come by....

  7. #7
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: 2007 PivotTable and filter on multiple values

    Not sure I know how to do this in VBA either, but my suggestion would be to add another column to your data and assign the team members there and then add a Report Filter to the pivot table and select team name.

    This should generate everybody with this team name.
    HTH
    Regards, Jeff

  8. #8
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: 2007 PivotTable and filter on multiple values

    If you don't post a sample workbook, do not expect too much help. You are allowed to use fictitious data.



  9. #9
    Registered User
    Join Date
    06-18-2009
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    33

    Re: 2007 PivotTable and filter on multiple values

    Thanks.. I am looking for VBA solution only. Am I in wrong place/forum?

  10. #10
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: 2007 PivotTable and filter on multiple values

    You are in the correct forum... but Pivot tables can also fall under the Programming forum... so that is the reason I tried to assist... I have asked for others to look at the thread and try to help.... but as snb suggests, you should make an effort to show a sample (void of confidential info) of what you are needing so that people will interpret properly your requirement and perhaps run tests before posting a solution.

  11. #11
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: 2007 PivotTable and filter on multiple values

    Is the source data in a worksheet? If so, I would add a formula column to check if a team member name is present in the Current Name field and then you can simply add this new field as a filter field in the pivot and filter for true.
    Remember what the dormouse said
    Feed your head

  12. #12
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: 2007 PivotTable and filter on multiple values

    Good thought romperstomper, didn't think of that.

  13. #13
    Registered User
    Join Date
    06-18-2009
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    33

    Re: 2007 PivotTable and filter on multiple values

    Yes, all the data is present in the same sheet.

    also, in the mean time, I will try to upload sample data from home.

  14. #14
    Registered User
    Join Date
    06-18-2009
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    33

    Re: 2007 PivotTable and filter on multiple values

    This can be closed now. This is what I have done...

    1. Copied all my team member's name into array
    2. copied all names into another array
    3. put a loop and check if the name consists of multiple names (separated by ";" ) and then for each name, search in my team array... if found, mark it as visible.

    I will post the macro soon... after removing the organization information.
    Last edited by xxxyyyy; 11-22-2011 at 11:54 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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