Filter using mutiple sheets to create an array?

MiniFav

Board Regular
Joined
Mar 10, 2020
Messages
83
Office Version
  1. 365
Platform
  1. Windows
I am looking to colate a list of values which appear on multiple tabs in a work book.

Sheet 1 and 2 below have varying data but not all in the same columns.

Book1
ABC
1NumbersLettersColours
2123abcblue
3456defred
4789ghiyellow
Sheet1


Book1
ABCD
1ShapesNumbersLettersColours
2Circle123abcred
3Square456defyellow
4Triangle789ghiblue
Sheet2


I would like sheet 3 to then filter the number columns from sheets 1 and 2 and pull any with the colour blue through. to show the below.

Book1
A
1Show Blue numbers
2123
3789
Sheet3


I can do this one sheet at a time using =FILTER(Sheet1!A2:A4,Sheet1!C2:C4="blue","") but struggling to get the array to then also check the second sheet.

I am looking to do this without macros, only formulas. Any assistance would be appreciated.
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Roughly how many rows of data do you have on each sheet?
 
Upvote 0
Ok, how about
Excel Formula:
=LET(a,FILTER(Sheet1!A2:A1000,Sheet1!C2:C1000="blue"),b,FILTER(Sheet2!B2:B1000,Sheet2!D2:D1000="blue"),r,ROWS(a),s,SEQUENCE(r+ROWS(b)),IF(s<=r,INDEX(a,s),INDEX(b,s-r)))
 
Upvote 0
Solution
=LET(a,FILTER(Sheet1!A2:A1000,Sheet1!C2:C1000="blue"),b,FILTER(Sheet2!B2:B1000,Sheet2!D2:D1000="blue"),r,ROWS(a),s,SEQUENCE(r+ROWS(b)),IF(s<=r,INDEX(a,s),INDEX(b,s-r)))
Again Fluff you have helped me out! going to have to start sending crates of beer as thanks!
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0
You can add more like
Excel Formula:
=LET(a,FILTER(Sheet1!A2:A1000,Sheet1!C2:C1000="blue"),b,FILTER(Sheet2!B2:B1000,Sheet2!D2:D1000="blue"),c,FILTER(Sheet1!A2:A1000,Sheet1!C2:C1000="blue"),ra,ROWS(a),rb,ra+ROWS(b),s,SEQUENCE(rb+ROWS(c)),IF(s<=ra,INDEX(a,s),IF(s<=rb,INDEX(b,s-ra),INDEX(c,s-rb))))
just as long as you do not have too many sheets.
 
Upvote 0
You can add more like
Excel Formula:
=LET(a,FILTER(Sheet1!A2:A1000,Sheet1!C2:C1000="blue"),b,FILTER(Sheet2!B2:B1000,Sheet2!D2:D1000="blue"),c,FILTER(Sheet1!A2:A1000,Sheet1!C2:C1000="blue"),ra,ROWS(a),rb,ra+ROWS(b),s,SEQUENCE(rb+ROWS(c)),IF(s<=ra,INDEX(a,s),IF(s<=rb,INDEX(b,s-ra),INDEX(c,s-rb))))
just as long as you do not have too many sheets.
I think the work book will be maximum of five sheets. I can understand the logic of majority of the formula so I will have a play. Thank you again!
 
Upvote 0
Would you be able to review the below? I am getting a #calc error, assuming I am exceeding the amount of sheets?

Excel Formula:
=LET(a,FILTER('(NA) - NOT APPLICABLE'!A2:A1000,'(NA) - NOT APPLICABLE'!I2:I1000="NOT IN BASELINE, VIEW EXEMPTIONS"),b,FILTER('(CLOSED) - CLOSED-TERMINATED'!B2:B1000,'(CLOSED) - CLOSED-TERMINATED'!L2:L1000="NOT IN BASELINE, VIEW EXEMPTIONS"),c,FILTER('(OPEN) - OPEN'!A2:A1000,'(OPEN) - OPEN'!L2:L1000="NOT IN BASELINE, VIEW EXEMPTIONS"),d,FILTER('(ONE-OFF) - ONE-OFF'!A2:A1000,'(ONE-OFF) - ONE-OFF'!R2:R1000="NOT IN BASELINE, VIEW EXEMPTIONS"),e,FILTER('(REPEAT) - REPEAT'!A2:A1000,'(REPEAT) - REPEAT'!AC2:AC1000="NOT IN BASELINE, VIEW EXEMPTIONS"),ra,ROWS(a),rb,ra+ROWS(b),rc,rb+ROWS(c),rd,rc+ROWS(d),s,SEQUENCE(rd+ROWS(e)),IF(s<=ra,INDEX(a,s),IF(s<=rb,INDEX(b,s-ra),IF(s<=rc,INDEX(c,s-rb), IF(s<=rd,INDEX(d,s-rc),INDEX(e,s-rd))))))
 
Upvote 0

Forum statistics

Threads
1,223,910
Messages
6,175,318
Members
452,634
Latest member
cpostell

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