Filter Filter to return only some columns

ShalDRH

New Member
Joined
Jul 28, 2021
Messages
17
Office Version
  1. 365
Platform
  1. Windows
Hello!

I am trying to extract data in the following set with only the month columns in the array as return columns.

In the two examples below the top left 2 values of CO# and Data are my variables and the yellow row of each array is what I want it to find as well as the corresponding month in the top row. The transposed example "answers" I want to get are in the green boxes to the left of the data sets.
  1. For the first data set I want to know which months have closings for CO# 56068 and how many closings are in each month.
  2. For the second data set I'm looking for which months have starts for CO# 56058 and how many in each month.

However, I keep getting the #value! response with my formula - =TRANSPOSE(FILTER(FILTER(D1:J21,(D1:D21=B1)*(E1:E21=B2)*(F2:J21>0),"0"),{0,0,1,1,1,1,1})) which seems to indicate my include arguments are wrong. I don't know how to change them so they are correct.

I appreciate your help!
Shalon

Book1
ABCDEFGHIJKLMNOPQRSTU
1Co#56068Co#DataOCT 2021NOV 2021DEC 2021JAN 2022FEB 2022Co#56058Co#DataOCT 2021NOV 2021DEC 2021JAN 2022FEB 2022
2DataClosings56058Sales871278DataStarts56058Sales871278
356058Starts14878856058Starts148788
4OCT 2021556058Closings86986OCT 20211456058Closings86986
5DEC 2021456063Sales00000NOV 2021856063Sales00000
656063Starts00000DEC 2021756063Starts00000
7#VALUE!56063Closings01100JAN 2022856063Closings01100
856068Sales10000FEB 2022856068Sales10000
956068Starts0000056068Starts00000
1056068Closings5040056068Closings50400
1156723Sales6595556723Sales65955
1256723Starts108913556723Starts1089135
1356723Closings6564456723Closings65644
1456726Sales6378756726Sales63787
1556726Starts8978856726Starts89788
1656726Closings1526356726Closings15263
1756071Sales6855556071Sales68555
1856071Starts13386756071Starts133867
1956071Closings0000056071Closings00000
2056043Sales86116656043Sales861166
2156043Starts126861056043Starts1268610
22
Sheet1
Cell Formulas
RangeFormula
A7A7=TRANSPOSE(FILTER(FILTER(D1:J21,(D1:D21=B1)*(E1:E21=B2)*(F2:J21>0),"0"),{0,0,1,1,1,1,1}))
Named Ranges
NameRefers ToCells
_FilterDatabase=Sheet1!$D$1:$J$72A7
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Try:

Book1 (version 2).xlsb
ABCDEFGHIJKLMNOPQRSTU
1Co#56068Co#DataOct-21Nov-21Dec-21Jan-22Feb-22Co#56058Co#DataOct-21Nov-21Dec-21Jan-22Feb-22
2DataClosings56058Sales871278DataStarts56058Sales871278
356058Starts14878856058Starts148788
4Oct-21556058Closings86986Oct-211456058Closings86986
5Dec-21456063Sales00000Nov-21856063Sales00000
656063Starts00000Dec-21756063Starts00000
756063Closings01100Jan-22856063Closings01100
856068Sales10000Feb-22856068Sales10000
956068Starts0000056068Starts00000
1056068Closings5040056068Closings50400
1156723Sales6595556723Sales65955
1256723Starts108913556723Starts1089135
1356723Closings6564456723Closings65644
1456726Sales6378756726Sales63787
1556726Starts8978856726Starts89788
1656726Closings1526356726Closings15263
1756071Sales6855556071Sales68555
1856071Starts13386756071Starts133867
1956071Closings0000056071Closings00000
2056043Sales86116656043Sales861166
2156043Starts126861056043Starts1268610
22
Sheet20
Cell Formulas
RangeFormula
A4:A5,L4:L8A4=TRANSPOSE(FILTER(F1:J1,FILTER(F2:J21,(D2:D21=B1)*(E2:E21=B2))>0))
B4:B5,M4:M8B4=INDEX(F2:J21,MATCH(1,(D2:D21=B1)*(E2:E21=B2),0),MATCH(A4#,F1:J1,0))
Dynamic array formulas.


I found a single-cell formula instead of 2, but it was pretty ugly.
 
Upvote 0
Solution
Try:

Book1 (version 2).xlsb
ABCDEFGHIJKLMNOPQRSTU
1Co#56068Co#DataOct-21Nov-21Dec-21Jan-22Feb-22Co#56058Co#DataOct-21Nov-21Dec-21Jan-22Feb-22
2DataClosings56058Sales871278DataStarts56058Sales871278
356058Starts14878856058Starts148788
4Oct-21556058Closings86986Oct-211456058Closings86986
5Dec-21456063Sales00000Nov-21856063Sales00000
656063Starts00000Dec-21756063Starts00000
756063Closings01100Jan-22856063Closings01100
856068Sales10000Feb-22856068Sales10000
956068Starts0000056068Starts00000
1056068Closings5040056068Closings50400
1156723Sales6595556723Sales65955
1256723Starts108913556723Starts1089135
1356723Closings6564456723Closings65644
1456726Sales6378756726Sales63787
1556726Starts8978856726Starts89788
1656726Closings1526356726Closings15263
1756071Sales6855556071Sales68555
1856071Starts13386756071Starts133867
1956071Closings0000056071Closings00000
2056043Sales86116656043Sales861166
2156043Starts126861056043Starts1268610
22
Sheet20
Cell Formulas
RangeFormula
A4:A5,L4:L8A4=TRANSPOSE(FILTER(F1:J1,FILTER(F2:J21,(D2:D21=B1)*(E2:E21=B2))>0))
B4:B5,M4:M8B4=INDEX(F2:J21,MATCH(1,(D2:D21=B1)*(E2:E21=B2),0),MATCH(A4#,F1:J1,0))
Dynamic array formulas.


I found a single-cell formula instead of 2, but it was pretty ugly.
Thanks so much Eric!

This 2 cell solution worked perfectly and I'm absolutely ok with ditching the single-cell formula. I plugged it into my actual data set and tested on numerous options with everything working as intended. Much appreciated.

Shalon
 
Upvote 0

Forum statistics

Threads
1,214,971
Messages
6,122,521
Members
449,088
Latest member
RandomExceller01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top