Results 1 to 3 of 3

Thread: Excel Table Distillation

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2005
    Posts
    5

    Excel Table Distillation

    I have a large table in Excel that I need to filter on 3 times. I'd like to use a series of combo boxes or cell validation on 3 cells to distill the data. First cell only displays the unique items in column1 of the table. Second cell then the items from col21 that qualified after the first pass. Third cell then does the same for criteria set by first two reductions. Very much an autofilter type application but I don't want the user in the table at all. I've written some knarly code to do this by brute force into a series of three combo boxes. I am wondering now if there is a more elegant way to approach this problem perhaps allowing direct entry into cells using validation (or other) without having to write the brute force matrix searches.

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Excel Table Distillation

    Couldnt you just programmatically autofilter on three colums so you get the same results? Is that not whats being asked? Record a macro doing your autofilter and view the generated code in the module.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2005
    Posts
    5

    Re: Excel Table Distillation

    I looked at the generated code but wasn't sure how to attach the table results dynamically to a cell to allow the next selection. I'll be more specific in my intent...

    Table has 12 columns. I will be searching for a specific row based on three column lookups as required to uniquely select a row. I want to present the lookups as combo boxes or better as cell-validation-lists on another worksheet. So in my case col1 is Product, col2 is width, and col3 is height.

    Sample Table

    Code:
    Col1   Col2   Col3
    PA      10      40
    PA      10      50
    PA      10      60
    PA      20      40
    PB      10      30
    PB      10      35
    On my user worksheet I have three cells or comboboxes all empty. They must be selected in order as the data must filter properly based on prior picks. So when user

    CellA needs to present pick list with PA, PB.
    if PA is selected then CellB needs to present pick list 10,20
    If 10 is selected then CellC needs to present pick list 40,50,60.
    If 50 is selected, I need a handle on the row uniquely selected from this process to extract data from the remaining columns (not shown in this example).

    Like I said I wrote a bunch of search and sort routines to do this the hard way but find I am need to do this more and more and would like to figure out how to leverage some of the high powered commands to work this reduction process more elegantly.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width