Home > OS >  How to use ranges from 2 sheets within Filter function
How to use ranges from 2 sheets within Filter function

Time:04-28

@Player0 helped me with my original question on getting this ArrayFormula set up. I am now needing to add additional ranges to the Filter functions. I thought using Concat would do the trick but it's just repeating values and not giving me the desired output.

Original Formula:

=ARRAYFORMULA(REGEXREPLACE(SUBSTITUTE(REGEXREPLACE(TRIM(QUERY(IF(
            FILTER('OFF FIGURE'!D11:Z184, MOD(COLUMN('OFF FIGURE'!D11:Z184) , 5)=0)=C11, 
            FILTER('OFF FIGURE'!E7:Z184, MOD(COLUMN('OFF FIGURE'!E7:Z184) 1, 5)=1), ),,9^9)), 
            "(?i) "," " ), "  ", ", "), "^$", "OPEN"))

Desired Formula:

=ARRAYFORMULA(CONCAT(REGEXREPLACE(SUBSTITUTE(REGEXREPLACE(TRIM(QUERY(IF(
            FILTER('OFF FIGURE'!D11:Z182, MOD(COLUMN('OFF FIGURE'!D11:Z182) , 5)=0)=C7, 
            FILTER('OFF FIGURE'!D7:Z178, MOD(COLUMN('OFF FIGURE'!D7:Z178) 1, 5)=1), ),,9^9)), 
            "(?i) "," " ), "  ", ", "), "^$", "OPEN"),
 ARRAYFORMULA(REGEXREPLACE(SUBSTITUTE(REGEXREPLACE(TRIM(QUERY(IF(
            FILTER(FASHION!D12:Z183, MOD(COLUMN(FASHION!D12:Z183) , 5)=0)=C7, 
            FILTER(FASHION!E7:Z178, MOD(COLUMN(FASHION!E7:Z178) 1, 5)=1), ),,9^9)), 
            "(?i) "," " ), "  ", ", "), "^$", "OPEN"))))

Desired outcome would be to get the values from both the Off Figure AND Fashion sheets. Obviously Concat is not what I want...

EDITS

I added the formula on this spreadsheet and got pretty much the same results I did when I tried using the Concat function.

Link to test spreadsheet: enter image description here

=ARRAYFORMULA(SUBSTITUTE(REGEXREPLACE(TRIM(QUERY({IF(
 FILTER(FASHION!D12:Z183, MOD(COLUMN(FASHION!D12:Z183), 5)=0)=C5, 
 FILTER(FASHION!D6:Z177, MOD(COLUMN(FASHION!D6:Z177) 1, 5)=0), ); IF(
 FILTER('Off Figure'!D12:Z183, MOD(COLUMN('Off Figure'!D12:Z183), 5)=0)=C5, 
 FILTER('Off Figure'!D6:Z177, MOD(COLUMN('Off Figure'!D6:Z177) 1, 5)=0), )},,9^9)), 
 "(?i)bay ", ), " ", ", "))

enter image description here

  • Related