+ Reply to Thread
Results 1 to 4 of 4

Creating a Filter loop based on unique values in a column

  1. #1
    Registered User
    Join Date
    10-23-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    7

    Creating a Filter loop based on unique values in a column

    OK, I am hoping someone can help me with this.
    First I need to obtain a range based on the unique values in a set column (lets call it B)
    Then I need to run a loop to filter all rows containing this list of unique values one at a time.
    I will perform some other calculations on this filtered data then jump to the next unique value in column B

    I have done something similar before that involved copying the data to different sheets and naming them based on the unique value currently running in the loop but I can't seem to get the syntax right to adapt it to do this within the existing worksheet.

    Here is a sample of what I tried to adapt.

    Please Login or Register  to view this content.
    I have attached a sample for the file I am trying to apply the loop I described to.

    Any help with this is greatly appreciated. I am totally stuck on this one.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Creating a Filter loop based on unique values in a column

    I haven't gotten into your macro, but if all you're looking to do is parse all the values of one sheet to separate sheets based on the unique values in one column, here's a published macro that 1000s of people have used for this purpose, very little tweaking will be needed for you to use it:


    -----------------------
    'SHEET1 TO MANY SHEETS
    Here's a macro for parsing rows of data from one sheet to many sheets named for the same values in a specific column.
    It not only can parse the rows, it can create the sheets if they are missing. There is a sample sheet there where you can test this out.
    Last edited by JBeaucaire; 12-26-2019 at 05:21 PM.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    10-23-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Creating a Filter loop based on unique values in a column

    Good deal, I was able to do some patch work with that and get this file working. Thans for the suggestion.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Creating a Filter loop based on unique values in a column

    As it appears you've reached a conclusion, I've marked this thread SOLVED for you.
    FYI, this is done through the Thread Tools located above the first post in this thread. Thanks.

+ 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. Macro for creating new sheets based on unique values in a row...
    By Cuda1337 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-05-2014, 09:02 PM
  2. [SOLVED] Filter for Unique Values based on Two Columns
    By jfried11 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-07-2014, 09:48 AM
  3. [SOLVED] Filter rows based on unique values in one column + specific value in another column
    By Dieneces in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-31-2013, 09:55 AM
  4. how to loop Criteria based on unique values in a column
    By excelkeechak in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-03-2009, 11:01 AM
  5. Replies: 3
    Last Post: 11-24-2008, 01:10 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