+ Reply to Thread
Results 1 to 14 of 14

Stuck trying to dynamically search for information using parameters across multiple sheets

  1. #1
    Registered User
    Join Date
    06-07-2017
    Location
    Calgary, Alberta
    MS-Off Ver
    2016
    Posts
    6

    Angry Stuck trying to dynamically search for information using parameters across multiple sheets

    Hi there,

    I've become stuck trying to create a dynamic master sheet in excel, which pulls similar data from several spreadsheets DEPENDING on what parameters a user is looking for.
    There are 9 spreadsheets that contain regular data organized the same way on each sheet (all dates are in column A, all units of area are in column D, regardless of spreadsheet etc.)
    What I want is for a user to be able to select any number of the sheets, any number of subtasks in those sheets, a start and end date, and/or a job # in any combination and be presented with all the rows of data that conform to those specifications in the master sheet, from which they could then create report-specific charts.

    For example, you could simply lookup all the data available in the floors spreadsheet after May 20th of this year, and those rows would come forward without pulling anything from the other 8 spreadsheets, or any earlier records in time; or you could pull all records before August 15th of 2016 across all the spreadsheets, or you could pull all the data related to Job # 6455 from Floors, Ceilings, and Mechanical, without bothering to pull from the remaining 6 sheets, and so on.

    Currently I'm stuck because I cannot create a compressed formula that checks ALL the spreadsheets or even a range of the spreadsheets, as soon as I try to check more than one at once with a logical operator it gives me #Value or #Ref depending which way I try to jig it.

    I know I could do this if I checked EVERY spreadsheet individually and concatenated my functions so that when one spreadsheet was checked it moved on to the next, but this would prevent me from having a totally dynamic solution because if I later wanted to add a sheet to represent added functionality to production, I would have to manually add that sheet to ALL the formulas that sweep through the sheets, etc. etc.

    Is there some key combination of functions or syntax that I am missing? Why can't I do something like INDIRECT("'"&A1:A9&"'A6:A10000") and store the names of my spreadsheets in cells A1:A9. In practice when watching the calculation step by step, this WILL show the sheet names and even combine them with the subsequent cell range, but then refuses to evaluate.

    Help?
    Ben

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Stuck trying to dynamically search for information using parameters across multiple sh

    You might be able to use what is known as a 3-D formula. I can tell better after getting a look at how everything is laid out and what kinds of formulas you are using.

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Registered User
    Join Date
    06-07-2017
    Location
    Calgary, Alberta
    MS-Off Ver
    2016
    Posts
    6

    Re: Stuck trying to dynamically search for information using parameters across multiple sh

    Okay, I've made up an altered spreadsheet showing just a random collection of data (ignore the sheet marked "finishes" which ironically is unfinished,
    but would eventually constitute part of the data in the same format)

    I duplicated the master sheet and made a before and after version.
    The after version shows what SHOULD be found given the data available and the parameters entered which is all work on or after May 19, Job # 3277, in the sheet "Ceilings".
    The key is I should be able to pick any sheet and/or subtask, or none, any dates, or none, and/or any job # or none, and the table would populate to contain copies of matching data for analysis.
    E.g. if I picked plumbing right now, there is no data in the example sheet, but if I asked for all work done before this week, it would find all the data across all the spreadsheets that was entered before that day.
    The instances count can be done either before or after the rows are filled in the table, it would just be an indicator whether enough data is available to be worth analyzing.

    Unfortunately due to upload limits I had to delete several sheets but the process should be the same, just longer and more wearisome to execute when I import it back into the original file.
    Please see attached,
    Ben
    Attached Files Attached Files

  4. #4
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Stuck trying to dynamically search for information using parameters across multiple sh

    So what do you want to do? Do you want to get all tasks associated with a job number and put them in the Master Table and then use the information in row 2 to filter it?

  5. #5
    Registered User
    Join Date
    06-07-2017
    Location
    Calgary, Alberta
    MS-Off Ver
    2016
    Posts
    6

    Re: Stuck trying to dynamically search for information using parameters across multiple sh

    That was an option I hadn't thought of, which might be easier? My hesitation on that idea is with the sheer amount of data I anticipate being added over time, which might make the table messy to work with if you didn't get very specific.

    My original plan had been to only pull into that table relevant data (notably excluding the actually measured time and material unit value since i'm only interested in time/unit ultimately)
    so the table would be empty, until such time as parameters were filled in at which point it would go looking for and present all the data that matched.

    Honestly your idea seems far superior to mine in flexibility since the filters in the table would let you do almost everything I wanted anyway.
    I would still be stuck at how to get dynamic data into that table to filter in the first place though, and I would then need a column for production sector the data is from.

  6. #6
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Stuck trying to dynamically search for information using parameters across multiple sh

    I tell you what. Let me "slap together" a prototype and we can go from there.

  7. #7
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Stuck trying to dynamically search for information using parameters across multiple sh

    Here is the prototype.

    First I need to commend you on using tables and using a strict naming convention. It makes life easier.

    There were some issues with the tables and validations since you copied the after sheet and things were cross-referenced to the before sheet.

    Also, you were referencing the entire table instead of the single column in the table. The end result was that if you added anything to the list, it was not included in the dropdown.

    So I broke the tables out and put them on a separate lookup sheet. They are now named dynamic ranges and are used in the various production sector sheets for validation.

    Here is a blurb on how to make named dynamic ranges.

    http://www.utteraccess.com/wiki/Offs...Dynamic_Ranges

    These are simple and are named for the production sectors. That is, the dropdown for ceilings is called ceilings, the dropdown for electrical is called electrical, etc.

    I noticed that you had extended the tables to the very end of the spreadsheet. There is no need to do this and it actually wastes resources. As you add data to a row immediately below a table, the new row becomes part of the table and formulas, formats, validation, etc. are copied down automatically.

    Here’s a blurb on tables.

    http://www.utteraccess.com/wiki/Tables_in_Excel

    After that bit of cleanup, I wrote some code (as you can see, it’s not very long, thanks to the naming conventions), that clears out the master table and copies all the other tables in.

    I added a column for Production Sector and a helper column to note if the dates for the tasks are between the dates in cells A2 and B2.

    The rest of the magic is provided by slicers. Slicers work with Excel tables and pivot tables. You may also want to use them on the other tables in the workbook. Select a cell in the table, and go to the insert ribbon and select Slicers. It’s pretty much self-explanatory from there.

    Slicers are filters. What’s more, they are automatically cascading filters, meaning that if I select a job number, only the production sectors, subtasks and dates associated with that job number are available for further selection. The rest are grayed out.

    So you can select everything for a job number and then look at the various production sectors or specific dates. Or you can clear all the filters (click on the filter icon on the top right) and look at specific production sectors for all project.

    You can also do multiple selections using the SHIFT and CTRL keys.

    So click on the Make Report Button fill in the dates, and play with the slicers.

    Still to do. You need to add the missing sheets and tables and hook them up to the validation for the drop-down lists. Also check the formulas. You may also need some additional dropdowns for things like sq ft vs. N/A.

    Also, you have some cells with multiple job numbers in them. While this might be convenient at the time of data entry, it does ruin the potential for using the Master Table as a data source for pivot table analysis.
    Attached Files Attached Files

  8. #8
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Stuck trying to dynamically search for information using parameters across multiple sh

    P.S. If you stick with your naming conventions for tables, the code will still work. You will have to add the new production sectors to Column W on the lookups sheet.

  9. #9
    Registered User
    Join Date
    06-07-2017
    Location
    Calgary, Alberta
    MS-Off Ver
    2016
    Posts
    6

    Talking Re: Stuck trying to dynamically search for information using parameters across multiple sh

    This is amazing. I will take some time to give it a thorough lookover today and understand all the updates you've made; but I think if I can apply this to the total sheet it should solve all my needs.
    Also, thanks for the reminder tip about tables, that will significantly help to keep the file smaller for sharing later.

    This has been exceptionally helpful and useful as a learning experience. I'm really curious about these list-buttons you've managed to makeup, they seem exceptionally powerful as a tool.

    Warm Regards,
    Ben

  10. #10
    Registered User
    Join Date
    06-07-2017
    Location
    Calgary, Alberta
    MS-Off Ver
    2016
    Posts
    6

    Re: Stuck trying to dynamically search for information using parameters across multiple sh

    One thing I'm just noticing is that it doesn't seem to like that the Plumbing spreadsheet is empty (it creates an empty row for it and also replaces Exteriors as the production sector on the last copied row) is this leftover from the line in the code for "Get new last row"?
    I don't think this is really an issue since all the spreadsheets should get data eventually but just wanted to check and ask since VBA isn't my strong suit.

  11. #11
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Stuck trying to dynamically search for information using parameters across multiple sh

    Yes, I think this is a minor bug. And you are correct, it has to do with "blank" tables. Tables always have at least one row of data it may be blank or it may have data. I can add a check for that and adjust last row accordingly.

  12. #12
    Registered User
    Join Date
    06-07-2017
    Location
    Calgary, Alberta
    MS-Off Ver
    2016
    Posts
    6

    Re: Stuck trying to dynamically search for information using parameters across multiple sh

    That's alright, as I said I don't anticipate any field of data being empty it is just currently so because I am still working out the system. Ultimately all the sheets will have relevant data and then the code should work perfectly. Thanks though!

    Ben

  13. #13
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Stuck trying to dynamically search for information using parameters across multiple sh

    Busy day today. I should be able to work on this again tomorrow.

  14. #14
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Stuck trying to dynamically search for information using parameters across multiple sh

    Here is the same file with a minor tweak not to include tables that have no data (I determine this by looking at the date column in the table. If it has no dates, I consider it to have no data).

    I hid the column that gives True/False if the date is within the date range, just to make the table look better.

    As I mentioned above, slicers are very easy to do. In addition to making the report look better and easier to navigate (you can usually see what's being filtered), they add a lot of functionality. They are self-cascading: the selection of one slicer affects the values available for selection in the other slicers.

    If you select a slicer you get a Slicer Tools tab on the ribbon. It has one choice: Options. This will let you change the caption, colors, height and width and even the number of columns (you can have two across, three across or whatever).

    The other thing as I mentioned above is that I strongly urge that you NOT make multiple entries in the job number column. To enforce this I suggest putting a data validation on it to look up against the named range, Jobs.
    Attached Files Attached Files

+ 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. Dynamically change data based on parameters
    By MrWicked in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 08-07-2015, 04:47 AM
  2. Client list with multiple search parameters
    By Mazie in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-27-2015, 04:06 PM
  3. Dynamically showcase data based upon certain parameters
    By Karroog in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-10-2014, 10:31 AM
  4. [SOLVED] Macro with Multiple Search Parameters for 2 Columns
    By lagiosman in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-20-2014, 06:04 PM
  5. Sumif Across Multiple Sheets Dynamically
    By mmcdill in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-20-2012, 06:29 AM
  6. Replies: 5
    Last Post: 05-26-2009, 06:36 PM
  7. multiple sheets that dynamically update
    By wcameron in forum Excel General
    Replies: 5
    Last Post: 05-28-2008, 05:01 PM

Tags for this Thread

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