Results 1 to 4 of 4

VBA To Create Multiple Queries When Data Varies

Threaded View

  1. #1
    Forum Contributor
    Join Date
    12-28-2015
    Location
    US
    MS-Off Ver
    365
    Posts
    133

    VBA To Create Multiple Queries When Data Varies

    Hi All,

    I have a database and I need to be able to separate data the same way each time, but the data is always different. I have attached a sample spreadsheet as an example. Basically, I'll have the "Main" tab and then will need to separate the data by Team, By Year and then by State. The way I am accomplishing that now is by manually filtering every single time (terrible!). The Sample file shows what the main data format looks like and then a sample breakdown of TeamA (only), I'll create separate files for TeamB-TeamD and break the data out the same way.

    So ideally, I would like to be able to upload this "Main" data dump to MS Access and with a combo box set to "Team A" and then create all the individual tabs or queries that I make manually by filtering. The thing is that every time I have a new data dump there will always be different numbers of Teams, States and Years. So I think the VBA would have to know to only create tabs/queries where years, teams and states are present and exclude where there are gaps.


    Thanks!!!
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 05-16-2014, 04:14 PM
  2. VBA to pull to create multiple web queries on 1 worksheet
    By M_J_B in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-12-2011, 02:13 PM
  3. Production planning - retrieve, update data and multiple queries
    By swanseaexcel in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 01-05-2011, 12:06 PM
  4. Pivot Items Count varies on multiple runs
    By narendramaruti in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-21-2009, 07:38 PM
  5. How do I create a macro to run queries with worksheet data
    By jfinn in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-25-2006, 07:15 AM
  6. [SOLVED] Create a report using multiple queries
    By bdiff in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-04-2006, 09:15 AM
  7. Replies: 0
    Last Post: 02-13-2006, 06: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