+ Reply to Thread
Results 1 to 12 of 12

Advanced Filtering Data Pulled Form Multiple Worksheets And Displayed On One Sheet

  1. #1
    Registered User
    Join Date
    08-06-2016
    Location
    Oklahoma city, Oklahoma, USA
    MS-Off Ver
    2016
    Posts
    30

    Advanced Filtering Data Pulled Form Multiple Worksheets And Displayed On One Sheet

    Hello,

    First off I dont know much of anything when it comes to programming in Excel with VBA, or programming in general. Ive spent a couple days in my free time trying to gather, search and tinker around with making things work with limited knowledge the way I need it to work. So excuse my poor coding for all you Expert Coders.

    The attached file was originally from someone else, but I need more out of it. I added Base_3 and 4 tabs and messed around with the coding some to get close to what I want. I also added the Base column in the tables and put the value number in the column matching the tab name value.

    So I will try to explain what I need.
    When I am working in Excel, similar to what is seen in the example file, I start out with one tab/worksheet named "Base_1". As I am working, I will create new Tabs and rename them "Base_2 and so on". while I am working and at the end of my work, I would like to use a Data Filtering Table as exampled in the file sheet name "Result". I would like the Filtering table to filter out a name or base value when displayed in the filter options. I could have up to 20 Tabs/worksheets by the end of my work or more or less.

    - If I want to filter out a specific Base value say 2, then I want A) the table to display all the data form worksheet Base_2 with no name filtered and B) with a name filtered.
    - If I dont filter out a specific Base or Name, then I want the filter table to display all data from all worksheets
    - sometimes not all my tab names will be names exactly "Base_1 or Base_2" and so on, sometimes I may add more text such as "Base_3 NW" or "Base_3 SWNW". So if it is possible to have the macro to search for tabs containing Base_# with added wildcard text, then that would be great, if not then I can live with naming a Sheet/tab name exactly.

    What I have now:
    Please Login or Register  to view this content.
    Let me know if you need more explanation from me.

    Again thanks to those viewing this and helping out, much appreciation.

    -Brent
    Last edited by disepyon; 07-14-2017 at 04:29 AM.

  2. #2
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,269

    Re: Advanced Filtering Data Pulled Form Multiple Worksheets And Displayed On One Sheet

    Hi disepyon

    Perhaps this is what you are after...
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by sintek; 07-14-2017 at 09:59 AM.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  3. #3
    Registered User
    Join Date
    08-06-2016
    Location
    Oklahoma city, Oklahoma, USA
    MS-Off Ver
    2016
    Posts
    30

    Re: Advanced Filtering Data Pulled Form Multiple Worksheets And Displayed On One Sheet

    Thanks Sintek for you help, let me spend some time going over you file and see if it does everything I need it to do.

  4. #4
    Registered User
    Join Date
    08-06-2016
    Location
    Oklahoma city, Oklahoma, USA
    MS-Off Ver
    2016
    Posts
    30

    Re: Advanced Filtering Data Pulled Form Multiple Worksheets And Displayed On One Sheet

    Ok so I just got done going over the file you made.

    So I just have one problem.
    Sorry I left this bit of information out. But I have other sheets that are named differently like Lease, Well, etc.. That contains different information. Is there a way to incorporate this into your Coded Macro you made for me so the Macor/filte table wont display data from sheets not Named BASE_#. Also Sometimes a BASE_# sheet/tab I will rename it in a case that I dont need the information anymore, Like I will completely rename it or just add text in front of BASE_#. If the macro could be setup to only filter and take data from sheets that only contain BASE_# & wildcard text. If I rename that tab to something different or add text in front of the name BASE_#, the filter table/Macro wont pull data from the renamed tab. Other than that it does exactly what I need it to do, I can filter out any Base sheet, Sale person name, combination of both or display everything with no filter option selected, I can also add a new sheet and it will take data and filter from the new Base sheet created. Also like that it filters the Base sheet too if I need to go look at that sheet. Also I can move the order of the sheets/tabs and it will still do its job. Awesome Job, I am definitely out of my mind to create a macro like this with very little programming knowledge.

    So:
    With a sale person name entered, it will not filter as the Sheet/tab name "Lease schedule" is added to this workbook, throws off the Macro.
    Entering in a Base value will work with the Sheet/tab name "Lease schedule" is added to this workbook

    So per my comment in Lease schedule Sheet, I only want the macro/filter table to pull data from only the Worksheets named BASE_#.
    If I rename the "BASE_#" sheet/tab to completely to something else like "End BASE_#" or "not needed" or just anything else, then I don’t want the macro to filter from the renamed sheet.
    If I add more text after "BASE_#" of the sheet/tab name such as "BASE_# NWSW", then Id still like for the macro/filter table to pull data from that sheet. If this cant be done, then I don’t mind only having my tab names specifically BASE_# and nothing else in order for the macro to recognize it.

    Hope this isnt to much trouble to revise your macro for this.

    Does it have to do with these bits of code?
    Please Login or Register  to view this content.
    and
    Please Login or Register  to view this content.
    Just trying to learn a little bit which is probably to complex for a noob like me to know.

    Thanks,
    Brent

  5. #5
    Registered User
    Join Date
    08-06-2016
    Location
    Oklahoma city, Oklahoma, USA
    MS-Off Ver
    2016
    Posts
    30

    Re: Advanced Filtering Data Pulled Form Multiple Worksheets And Displayed On One Sheet

    Hehe I figured it out, well not sure its the best way but it works.

    Please Login or Register  to view this content.
    I changed if sht.name <>ws.name then to if sht.name like "BASE_* then

    Now the last problem, or not really a problem I guess, but for instance if I input the value 6 in the filtering Base option on the results sheet, and there is no Sheets named "BASE_6", how do I get the macro to pop up a message box to say "Base 6 does not exist" and hit the ok button on the box?

  6. #6
    Registered User
    Join Date
    08-06-2016
    Location
    Oklahoma city, Oklahoma, USA
    MS-Off Ver
    2016
    Posts
    30

    Re: Advanced Filtering Data Pulled Form Multiple Worksheets And Displayed On One Sheet

    Well I re-edited the code, because when i did a filtering search involving base value it wouldnt search tab/sheet names with wildcards after BASE_#. Now it does.
    Please Login or Register  to view this content.
    well folks I think it can be safe to say this problem is SOLVED!! still would like to have a message box show up on any false statements. will let you know if I get it figured out.

    Thanks again Sintek, I gave rep to you, wont let me rep you again, says to share it.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    08-06-2016
    Location
    Oklahoma city, Oklahoma, USA
    MS-Off Ver
    2016
    Posts
    30

    Re: Advanced Filtering Data Pulled Form Multiple Worksheets And Displayed On One Sheet

    Ok well I am opening this thread back up as not solved yet as I want to take this Macro a few steps further.

    This is what I also want out of this filtering macro:
    - If I type in jo for salesperson, I want the macro/filter table to return all salespersons containing jo, whether it be at the start of the text string or somewhere with in. So John and Joe should show up

    - Also id like for the macro to only pull values in the value column between lets say for this example from greater than 0 and less than 200. So for the template I use for work, there will be quite a lot of people who have no integer in the value column and it would be just 0 or a blank cell. when filtering for name or Base, I only want salespersons to show up that have value and all who dont have value wont display in the filtering table. But for this example it will just be everyone from 0 to 200 value.

    - Finally id like for the macro to sort in order the values from greatest to smallest in descending order (largest vale shown on top and lowest value shown on bottom).

    Please use the attached file in this post.

    I am really stumped right now, tried recording my self and looking at the recorded codes, but not sure how I would incorporate it in the current macro.

    Thanks for viewing and the help, meanwhile ill be at it...
    -Brent
    Attached Files Attached Files
    Last edited by disepyon; 07-15-2017 at 02:13 AM.

  8. #8
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,269

    Re: Advanced Filtering Data Pulled Form Multiple Worksheets And Displayed On One Sheet

    Hi Brent

    K, Have adapted code to suite all requirements except the "*Jo*" Filter...Below the code is a snippet of code...This is the jist of what the code will look like...No time right now to incorporate....Will have a look on Monday again...
    Please Login or Register  to view this content.
    For the "Jo" Part...This works but must be integrated into the different scenarios....Will have to add "Jo" to your drop down though or remove the error filter
    Please Login or Register  to view this content.
    Last edited by sintek; 07-15-2017 at 05:15 AM.

  9. #9
    Registered User
    Join Date
    08-06-2016
    Location
    Oklahoma city, Oklahoma, USA
    MS-Off Ver
    2016
    Posts
    30

    Re: Advanced Filtering Data Pulled Form Multiple Worksheets And Displayed On One Sheet

    Thanks Sintek, I will spend sometime going over it and let you know.

  10. #10
    Registered User
    Join Date
    08-06-2016
    Location
    Oklahoma city, Oklahoma, USA
    MS-Off Ver
    2016
    Posts
    30

    Re: Advanced Filtering Data Pulled Form Multiple Worksheets And Displayed On One Sheet

    AWESOME!! got this figured out now. Sorts from largest value to smallest and I got it to group the Base numbers while retaining the value sorting.
    The Partial name search and pulling and displaying everything containing what is typed in, for this example salesperson, works like a CHARM!!
    The Message box I do not care about much anymore as displaying a blank table is fine with me, just means that nothing was found. I will play with it maybe.

    here is the last edited Code:
    Please Login or Register  to view this content.
    Thanks again SinTek for showing me the right path on a lot of this. will Rep you again.

    CASE CLOSED, SOLVED!!
    Attached Files Attached Files
    Last edited by disepyon; 07-16-2017 at 05:52 AM.

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,386

    Re: Advanced Filtering Data Pulled Form Multiple Worksheets And Displayed On One Sheet

    To flag the thread as solved, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  12. #12
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,269

    Re: Advanced Filtering Data Pulled Form Multiple Worksheets And Displayed On One Sheet

    Glad you got it sorted...tx for rep +

+ 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: 5
    Last Post: 08-04-2015, 12:09 PM
  2. Advanced Filtering by ID on other sheet
    By Viktor86HUN in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-19-2014, 03:27 AM
  3. Excel advanced filtering on multiple sheets
    By blind527 in forum Excel General
    Replies: 4
    Last Post: 05-04-2013, 08:56 PM
  4. [SOLVED] Creating a list of data pulled from multiple worksheets
    By mzbreski in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-22-2012, 10:12 PM
  5. Consolidating data from multiple worksheets and filtering based on priority...
    By Spiska01 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-07-2012, 09:19 AM
  6. Advanced filtering with multiple lines in VBA code
    By surfthenet in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-15-2012, 06:56 AM
  7. Advanced Filtering with multiple criteria
    By drumbody in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-16-2007, 08:51 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