Combining multiple ranges with filter-formula?

%3CLINGO-SUB%20id%3D%22lingo-sub-1162869%22%20slang%3D%22en-US%22%3ECombining%20multiple%20ranges%20with%20filter-formula%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1162869%22%20slang%3D%22en-US%22%3E%3CP%3EHi!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20Google%20Spreadsheets%20you%20can%20combine%20multiple%20ranges%20with%20the%20filter%20function%20with%20the%20use%20of%20%7B%20%7D%20as%20shown%20below.%20Is%20there%20any%20way%20of%20doing%20this%20with%20the%20new%20Filter-formula%20in%20Excel%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20is%20the%20Google%20way%20(not%20working%20in%20Excel)%3A%26nbsp%3B%3CSPAN%20class%3D%22%20default-formula-text-color%22%3E%3D%3C%2FSPAN%3E%3CSPAN%20class%3D%22%20default-formula-text-color%22%3Efilter%3C%2FSPAN%3E%3CSPAN%20class%3D%22%20default-formula-text-color%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22%20default-formula-text-color%22%3E%7B%3C%2FSPAN%3E%3CSPAN%3EG2%3AG20%3C%2FSPAN%3E%3CSPAN%20class%3D%22%20default-formula-text-color%22%3E%2C%3C%2FSPAN%3E%3CSPAN%3EP2%3AP20%3C%2FSPAN%3E%3CSPAN%20class%3D%22%20default-formula-text-color%22%3E%7D%3C%2FSPAN%3E%3CSPAN%20class%3D%22%20default-formula-text-color%22%3E%2C%3C%2FSPAN%3E%3CSPAN%20class%3D%22%20default-formula-text-color%22%3E%7B%3C%2FSPAN%3E%3CSPAN%3EG2%3AG20%3C%2FSPAN%3E%3CSPAN%20class%3D%22%20default-formula-text-color%22%3E%2CP%3C%2FSPAN%3E%3CSPAN%3E2%3AP20%3C%2FSPAN%3E%3CSPAN%20class%3D%22%20default-formula-text-color%22%3E%7D%3C%2FSPAN%3E%3CSPAN%20class%3D%22%20%20default-formula-text-color%22%3E%3D%22Hello%3C%2FSPAN%3E%3CSPAN%20class%3D%22%20string%20%22%3E%22%3C%2FSPAN%3E%3CSPAN%20class%3D%22%20default-formula-text-color%22%3E)%20which%20will%20show%20all%20the%20cells%20in%20the%20ranges%20G2%3AG20%20and%20P2%3AP20%20with%20%22Hello%22.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22%20default-formula-text-color%22%3EI'm%20not%20in%20need%20of%20any%20workarounds%2C%20I'm%20just%20interested%20if%20this%20feature%20is%20possible%20with%20Filter%20in%20Excel%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22%20default-formula-text-color%22%3EThanks!%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1162869%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1163466%22%20slang%3D%22en-US%22%3ERe%3A%20Combining%20multiple%20ranges%20with%20filter-formula%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1163466%22%20slang%3D%22en-US%22%3EI%20don't%20use%20Google%20sheets%20so%20can%20you%20explain%20what%20you%20are%20trying%20to%20achieve%20and%20perhaps%20provide%20a%20sample%20spreadsheet%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1163550%22%20slang%3D%22en-US%22%3ERe%3A%20Combining%20multiple%20ranges%20with%20filter-formula%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1163550%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F22322%22%20target%3D%22_blank%22%3E%40Jan%20Karel%20Pieterse%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20taking%20the%20time!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHere%20is%20a%20spreadsheet%20that%20shows%20the%20result%20I%20want.%20It's%20not%20just%20combining%20the%20two%20lists%20I'm%20after%2C%20I%20want%20to%20have%20a%20dynamic%20filter%20without%20any%20Index%2Fmatch%20or%20Vlookup-workarounds.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.google.com%2Fspreadsheets%2Fd%2F1gbIy-06at_1PhTquwUSO5xfTah-PSB7-guC-XtoOWa0%2Fedit%3Fusp%3Dsharing%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.google.com%2Fspreadsheets%2Fd%2F1gbIy-06at_1PhTquwUSO5xfTah-PSB7-guC-XtoOWa0%2Fedit%3Fusp%3Dsharing%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1164010%22%20slang%3D%22en-US%22%3ERe%3A%20Combining%20multiple%20ranges%20with%20filter-formula%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1164010%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F550871%22%20target%3D%22_blank%22%3E%40blastlast%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3ELike%20you%2C%20I%20am%20pretty%20sure%20the%20answer%20in%20no%2C%20it%20is%20not%20possible.%26nbsp%3B%20What%20I%20am%20less%20convinced%20of%20is%20whether%20it%20should%20be%20possible%3F%26nbsp%3B%20Firstly%2C%20I%20do%20not%20fully%20understand%20what%20the%20notation%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3D%20%7Brange1%2C%20range2%7D%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3Esignifies.%26nbsp%3B%20Something%20that%20might%20be%20useful%2C%20is%20to%20use%20the%20notation%20to%20define%20an%20array%20of%20ranges.%26nbsp%3B%20At%20the%20moment%20this%20needs%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3D%20IF(%20%7B1%2C0%7D%2C%20range1%2C%20range2%20)%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EThat%20does%20not%20seem%20to%20be%20the%20case%20here%2C%20however.%26nbsp%3B%20What%20you%20have%20described%20looks%20more%20like%20a%20sequence%20of%20%3CSTRONG%3EFILTER%3C%2FSTRONG%3E%20operations%2C%20the%20results%20of%20which%20are%20to%20be%20appended.%26nbsp%3B%20There%20must%20be%20more%20transparent%20notations%20for%20such%20a%20compound%20operation.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20is%20possible%20to%20produce%20what%20you%20describe%20in%20Excel%20with%20array%20methods%20but%20it%20is%20cumbersome.%26nbsp%3B%20Filtering%20and%20appending%20lists%20is%20more%20PowerQuery%20than%20dynamic%20arrays.%26nbsp%3B%20I%20also%20think%20Charles%20Williams's%20FastExcel%20addin%20features%20a%20function%20to%20append%20data%20to%20lists.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1171103%22%20slang%3D%22en-US%22%3ERe%3A%20Combining%20multiple%20ranges%20with%20filter-formula%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1171103%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F214174%22%20target%3D%22_blank%22%3E%40Peter%20Bartholomew%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20not%20sure%20if%20I%20understand%20what%20you%20mean%3F%20In%20Google%20Spreadsheets%20it%20is%20possible%20and%20it%20is%20a%20great%20feature%20to%20be%20able%20to%20make%20advanced%20filters%20of%20multiple%20ranges%20or%20sheets.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%20as%20I%20understand%2C%20it's%20not%20possible%20in%20Excel%2C%20only%20Google%20Sheet.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hi!

 

In Google Spreadsheets you can combine multiple ranges with the filter function with the use of { } as shown below. Is there any way of doing this with the new Filter-formula in Excel?

 

This is the Google way (not working in Excel): =filter({G2:G20,P2:P20},{G2:G20,P2:P20}="Hello") which will show all the cells in the ranges G2:G20 and P2:P20 with "Hello".

 

I'm not in need of any workarounds, I'm just interested if this feature is possible with Filter in Excel?

Thanks!

5 Replies
I don't use Google sheets so can you explain what you are trying to achieve and perhaps provide a sample spreadsheet?

@Jan Karel Pieterse 

 

Thanks for taking the time!

 

Here is a spreadsheet that shows the result I want. It's not just combining the two lists I'm after, I want to have a dynamic filter without any Index/match or Vlookup-workarounds. 

 

https://docs.google.com/spreadsheets/d/1gbIy-06at_1PhTquwUSO5xfTah-PSB7-guC-XtoOWa0/edit?usp=sharing

@blastlast 

Like you, I am pretty sure the answer in no, it is not possible.  What I am less convinced of is whether it should be possible?  Firstly, I do not fully understand what the notation

= {range1, range2}

signifies.  Something that might be useful, is to use the notation to define an array of ranges.  At the moment this needs 

= IF( {1,0}, range1, range2 )

That does not seem to be the case here, however.  What you have described looks more like a sequence of FILTER operations, the results of which are to be appended.  There must be more transparent notations for such a compound operation.

 

It is possible to produce what you describe in Excel with array methods but it is cumbersome.  Filtering and appending lists is more PowerQuery than dynamic arrays.  I also think Charles Williams's FastExcel addin features a function to append data to lists.

@Peter Bartholomew 

 

I'm not sure if I understand what you mean? In Google Spreadsheets it is possible and it is a great feature to be able to make advanced filters of multiple ranges or sheets.

 

But as I understand, it's not possible in Excel, only Google Sheet.

 

Thanks!

@blastlast While the method is not the same as Google Sheets, the result is possible in Excel! This video best explains but essentially you'll want to have an original filter function with the full range then wrap the original filter function with a new filter function that has an {array} for the "include" parameter with 1s for the number column(s) you do want and 0s for the number column(s) you do not want.

 

For example, say I wanted to a range (A to D) where D = "Microsoft" but only wanted to select columns A and C, I'd insert in the formula

 

=FILTER(FILTER(A2:D10,D2:D10="Microsoft"),{1,0,1,0})

 

Hope this helps!