FILTER formula with criteria not working

%3CLINGO-SUB%20id%3D%22lingo-sub-2741136%22%20slang%3D%22en-US%22%3EFILTER%20formula%20with%20criteria%20not%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2741136%22%20slang%3D%22en-US%22%3E%3CP%3EOk%20so%20I%20have%204%20tabs%20worth%20of%20information%3A%26nbsp%3B%3C%2FP%3E%3CP%3E1)%20Site%20information%3C%2FP%3E%3CP%3E2)Company%20contact%20information%3C%2FP%3E%3CP%3E3)%20Company%20scope%20(which%20is%20what%20work%20types%20each%20company%20can%20do)%3C%2FP%3E%3CP%3E4)%20Company%20Span%20(which%20is%20which%20locations%20each%20company%20can%20work%20at)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETabs%201%20and%202%20are%20unique%20entries%20and%20tabs%203%20%26amp%3B%204%20enter%20multiple%20companies%20and%20multiple%20sites.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20wanted%20to%20make%20a%205th%20tab%20with%20a%20search%20so%20the%20user%20can%20enter%20a%20branch%2C%20and%20a%20work%20type%2C%20from%20a%20dropdown%20box%20then%20return%20the%20contact%20information%20for%20all%20companies%20that%20meet%20that%20criteria%20but%20I%20cannot%20get%20it%20to%20work!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20never%20used%20this%20function%20before%3B%20I%20did%20confirm%20I'm%20on%20O365.%26nbsp%3B%20please%20see%20attached%20file%20with%20the%20tables%20in%20them.%20all%20tables%20are%20named%20and%20the%20two%20search%20fields%20are%20also%20named.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2741136%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2741243%22%20slang%3D%22en-US%22%3ERe%3A%20FILTER%20formula%20with%20criteria%20not%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2741243%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1152550%22%20target%3D%22_blank%22%3E%40JeBickel%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'd%20love%20to%20help.%20I%20find%20the%20%3CSTRONG%3EFILTER%3C%2FSTRONG%3E%20function%20amazing%2C%20one%20of%20the%20best%20features%20ever.%20%26nbsp%3BBUT%20the%20way%20you've%20laid%20out%20your%20tables%20and%20your%20named%20ranges%20(!!)%20is%20actually%20interfering%20with%20clarity%20and%20simplicity.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt's%20difficult%20for%20me%20to%20be%20sure%20what's%20going%20wrong%20here%2C%20but%20%3CEM%3E%3CU%3E%3CSTRONG%3EIF%3C%2FSTRONG%3E%3C%2FU%3E%3C%2FEM%3E%20I'm%20following%20what%20you%20want%20to%20do%2C%20one%20of%20the%20difficulties%20is%20that%20you've%20got%20too%20many%20tables%20here....FILTER%20will%20go%20through%20one%20table%20at%20a%20time%2C%20and%20the%20selection%20criteria%20need%20to%20be%20in%20that%20same%20table%20in%20order%20for%20it%20to%20work.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20looks%20to%20me%20as%20if%2C%20the%20way%20you've%20laid%20out%20the%20data%2C%20you%20would%20need%20to%20search%20through%20two%20tables%20(or%20more!)%20in%20order%20to%20find%20a%20vendor%20profile%20that%20meets%20the%20combined%20criteria%20of%20Branch%20%23%20and%20Work%20Type%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt's%20possible%20that%20Power%20Query--which%20on%20a%20Mac%20I%20do%20not%20have--could%20work%20for%20you%3B%20that's%20different%20from%20FILTER%20and%20does%20allow%20the%20use%20of%20multiple%20tables%20far%20more%20readily%20than%20does%20FILTER.%20For%20that%20I'll%20defer%20to%20some%20of%20the%20other%20Excel%20experts.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20it%20turns%20out%20that%20you%20too%20are%20on%20a%20Mac%2C%20then%20I%20suggest%20we'd%20need%20to%20re-organize%20some%20of%20the%20tables.%20I%20just%20discovered%20that%20you've%20hidden%20some%20sheets...notably%20the%20ones%20containing%20lists%20that%20are%20used%20for%20data%20validation%20and%20other%20purposes%3B%20it%20would%20have%20been%20helpful%20to%20those%20of%20us%20from%20whom%20you're%20requesting%20help%20had%20you%20not%20done%20so%3B%20it's%20a%20good%20practice%20when%20the%20system%20is%20working%2C%20but%20while%20under%20development%2C%20keeping%20such%20things%20visible%20is%20good%20practice.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt's%20also%20clear%20from%20some%20of%20the%20diagrams%20that%20you're%20quite%20sophisticated%20in%20database%20design%2C%20perhaps%20having%20worked%20on%20full%20relational%20databases%20in%20the%20past.%20That%20would%20fit%20too%20with%20the%20way%20you've%20laid%20things%20out%2C%20working%20toward%20%22data%20normalization.%22%20And%20that%20would%20also%20suggest%20that%20Power%20Query%20is%20more%20what%20you%20need%20than%20FILTER%3B%20the%20latter%20works%20well%20with%20a%20non-relational%20(flat%20file)%20database.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20as%20noted%20above%2C%20I'm%20going%20to%20defer%20to%20some%20of%20the%20others%20here%20in%20this%20forum%20who%20are%20versed%20in%20Power%20Query%20and%20associated%20tools.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2741278%22%20slang%3D%22en-US%22%3ERe%3A%20FILTER%20formula%20with%20criteria%20not%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2741278%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F425987%22%20target%3D%22_blank%22%3E%40mathetes%3C%2FA%3E%26nbsp%3BThanks%20for%20the%20reply%2C%20apologies%2C%20I%20meant%20to%20unhide%20those%20sheets%20but%20I%20must%20not%20have%20hit%26nbsp%3B%3CEM%3ESave.%3C%2FEM%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eyes%2C%20I'm%20familiar%20with%20databases%20in%20a%20passing%20manner%3B%20more%20in%20that%20I%20understand%20the%20logic%20than%20any%20skills%20in%20building%20them.%26nbsp%3B%20The%20goal%20is%20for%20this%20sheet%20to%20eventually%20be%20uploaded%20into%20a%20Vendor%20management%20module%20(hence%20my%20attempting%20to%20lay%20it%20out%20as%20close%20to%20import%20format%20as%20possible)%20but%20that%20is%20month's%20down%20the%20road%20and%20I've%20been%20tasked%20to%20develop%20an%20interim%20solution.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20never%20used%20FILTER%20function%20before%20as%20I've%20only%20just%20gotten%20on%20365.%20so%20it%20only%20searches%20one%20table%20at%20a%20time%3F%20How%20would%20I%20create%20a%20single%20criteria%20search%3F%20say%20the%20company%20name%20against%20the%20branch%20location%3F%20Could%20I%20then%20apply%20INDEX%20Match%20to%20the%20other%20columns%20to%20pull%20the%20relevant%20contact%20information%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20also%20never%20used%20Power%20Query%2C%20but%20it%20does%20sound%20like%20that%20may%20be%20more%20in%20line%20with%20what%20I%20need%3F%20I%20wish%20I%20could%20put%20this%20on%20a%20single%20master%20table%20but%20in%20the%20full%20database%20I%20have%20225%20branches%2C%20~400%20vendors%20and%2012%20work%20types%20that%20could%20apply%20to%20each%20vendor...%20I%20can't%20think%20of%20a%20way%20to%20get%20it%20in%20any%20other%20format....%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20could%20be%20that%20my%20most%20simple%20stopgap%20solution%20is%20a%20tiny%20little%20baby%20Access%20Database%20but%20i'm%20trying%20to%20avoid%20that%20if%20I%20can.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20the%20response!%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Ok so I have 4 tabs worth of information: 

1) Site information

2)Company contact information

3) Company scope (which is what work types each company can do)

4) Company Span (which is which locations each company can work at)

 

Tabs 1 and 2 are unique entries and tabs 3 & 4 enter multiple companies and multiple sites. 

 

I wanted to make a 5th tab with a search so the user can enter a branch, and a work type, from a dropdown box then return the contact information for all companies that meet that criteria but I cannot get it to work!

 

I've never used this function before; I did confirm I'm on O365.  please see attached file with the tables in them. all tables are named and the two search fields are also named.

3 Replies

@JeBickel 

 

I'd love to help. I find the FILTER function amazing, one of the best features ever.  BUT the way you've laid out your tables and your named ranges (!!) is actually interfering with clarity and simplicity.

 

It's difficult for me to be sure what's going wrong here, but IF I'm following what you want to do, one of the difficulties is that you've got too many tables here....FILTER will go through one table at a time, and the selection criteria need to be in that same table in order for it to work.

 

It looks to me as if, the way you've laid out the data, you would need to search through two tables (or more!) in order to find a vendor profile that meets the combined criteria of Branch # and Work Type 

 

It's possible that Power Query--which on a Mac I do not have--could work for you; that's different from FILTER and does allow the use of multiple tables far more readily than does FILTER. For that I'll defer to some of the other Excel experts.

 

If it turns out that you too are on a Mac, then I suggest we'd need to re-organize some of the tables. I just discovered that you've hidden some sheets...notably the ones containing lists that are used for data validation and other purposes; it would have been helpful to those of us from whom you're requesting help had you not done so; it's a good practice when the system is working, but while under development, keeping such things visible is good practice. 

 

It's also clear from some of the diagrams that you're quite sophisticated in database design, perhaps having worked on full relational databases in the past. That would fit too with the way you've laid things out, working toward "data normalization." And that would also suggest that Power Query is more what you need than FILTER; the latter works well with a non-relational (flat file) database.

 

So as noted above, I'm going to defer to some of the others here in this forum who are versed in Power Query and associated tools.

@mathetes Thanks for the reply, apologies, I meant to unhide those sheets but I must not have hit Save.

 

yes, I'm familiar with databases in a passing manner; more in that I understand the logic than any skills in building them.  The goal is for this sheet to eventually be uploaded into a Vendor management module (hence my attempting to lay it out as close to import format as possible) but that is month's down the road and I've been tasked to develop an interim solution.

 

I've never used FILTER function before as I've only just gotten on 365. so it only searches one table at a time? How would I create a single criteria search? say the company name against the branch location? Could I then apply INDEX Match to the other columns to pull the relevant contact information?

 

I've also never used Power Query, but it does sound like that may be more in line with what I need? I wish I could put this on a single master table but in the full database I have 225 branches, ~400 vendors and 12 work types that could apply to each vendor... I can't think of a way to get it in any other format....

 

It could be that my most simple stopgap solution is a tiny little baby Access Database but i'm trying to avoid that if I can.

 

Thanks for the response! 

@JeBickel 

 

I learned about FILTER (along with a couple other of the Dynamic Array functions) from this video. After that, it was all trial and error, but the video is great. https://www.youtube.com/watch?v=9I9DtFOVPIg

 

And I wondered about Access: haven't used it in years (having retired nearly 20 years ago, I just work with my own files now, so don't really need that kind of power).....I too have more of a "logic" connection with relational databases than an actual hands on, at least current. Back thirty years ago I was pretty good with SQL, querying an IBM mainframe database, extracting data to Excel (or Access), and was involved as the director (on the client side) of an HR and Payroll database for a major corporation.....so I learned some of the jargon as well as actually just having fun. The logic of normalization of a database is quite fascinating.....and for the sake of efficiency may be exactly what you need. Power Query does make it possible, from what I understand, within Excel.....so best wishes.