+ Reply to Thread
Results 1 to 4 of 4

Macro to filter variable data

  1. #1
    Registered User
    Join Date
    06-30-2015
    Location
    England
    MS-Off Ver
    2013
    Posts
    2

    Unhappy Macro to filter variable data

    Hi All,

    I've got an issue which hopefully I'll be able to work around. I currently have a large amount of raw data to which I have developed a macro to display in various forms which works great. However during this process it selects filters on a PivotTable which are team names. These team names are variable from week to week and I'm gaving to change the macro every other day which is extremely time consuming, that much so that it's almost defeating the object of having it. For example...

    One week the data will consist of:

    Team 1 - Stephen Kent
    Team 1 - Caroline Kent
    Team 1 - Bill Kent

    Then on the next week it could contain an extra three names:

    Team 1 - Stephen Kent
    Team 1 - Caroline Kent
    Team 1 - Bill Kent
    Team 1 - Dave Kent
    Team 1 - Peter Kent
    Team 1 - Phil Kent

    Is there anyway I could get a macro to filter this data without having to manually add names every week i.e. if it contains 'Team 1' then yes select?!

    In addition to this a couple of the filters I would want to use have a couple of names within so, it may be that I want to filter:

    Team A - Stephen Kent
    Team A - Caroline Kent
    Team A - Bill Kent
    Team 2 - Dave Kent
    Team C - Peter Kent
    Team 2 - Phil Kent

    Is there a way I could do the same as above but if it contains 'Team A', 'Team 2' & 'Team C'?

    As the first part of the team name always consists of 'Team 1' 'Team 2' etc. I was wondering if there was a way to filter off the PivotTable using the start of team name?

    As you'll be able to tell I'm fairly new to this so hopefully it makes sense.

    Regards,
    Stephen

  2. #2
    Forum Contributor
    Join Date
    06-24-2005
    Location
    excelliot.com
    MS-Off Ver
    2007
    Posts
    325

    Re: Macro to filter variable data

    Hi

    share an example file to ease

    Cheers!!

  3. #3
    Registered User
    Join Date
    06-30-2015
    Location
    England
    MS-Off Ver
    2013
    Posts
    2

    Re: Macro to filter variable data

    Thanks for your quick reply! Unfortunately I can't due to the confidentiallity of the document. It would take far too much time to change all the names etc. I guess I'll have to continue to do it manually. I was just wondering if there weas a generic VBA to filter using a phrase or a couple of phrases.

  4. #4
    Forum Contributor
    Join Date
    06-24-2005
    Location
    excelliot.com
    MS-Off Ver
    2007
    Posts
    325

    Re: Macro to filter variable data

    you can certainly do this using macro but it would be difficult to give solution without seeing base data..

+ 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. [SOLVED] How to filter data for more than one variable
    By Mary22 in forum Excel General
    Replies: 5
    Last Post: 06-21-2015, 04:17 PM
  2. Macro to filter a pivot whilst looping through filter criteria in a variable list.
    By Alistairm88 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-29-2015, 04:25 AM
  3. Using a macro to operate a filter on variable data
    By Timmy Pope in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-03-2014, 01:28 PM
  4. Replies: 1
    Last Post: 10-27-2012, 02:54 AM
  5. user variable macro filter thing
    By ashfire in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-24-2006, 09:55 AM

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