Forum Discussion

deniztopcu's avatar
deniztopcu
Copper Contributor
Oct 28, 2022
Solved

just filter specific rows and columns

 

Hi,

I want to filter only certain rows and columns. It may be on a different path. (vloop, hloop) but how can I do it in short way like filter.
The table in the first picture is the result I got with the filter function from the second picture.
How can I extract data for row headers that are only Blue scanned?

 

 

  • deniztopcu 

    Try this:

    =LET(filtered,FILTER(Combined_tblFinancials[[itemDescTr]:[2021/6]],Combined_tblFinancials[Symbol]=B1),INDEX(filtered,XMATCH(RowHeaders,INDEX(filtered,,1)),SEQUENCE(,7)))

11 Replies

  • Patrick2788's avatar
    Patrick2788
    Silver Contributor

    deniztopcu 

    Try this:

     

    =LET(pullrows,CHOOSEROWS(Combined_tblFinancials,IFERROR(XMATCH(Sayfa1!A2:A148,Combined_tblFinancials[itemCode]),0)),CHOOSECOLS(pullrows,SEQUENCE(,6,2,2)))

     

    Without access to CHOOSECOLS/ROWS, you might use:

    =INDEX(Combined_tblFinancials,IFERROR(XMATCH(Sayfa1!A2:A148,Combined_tblFinancials[itemCode]),0),SEQUENCE(,6,2,2))

     

    • deniztopcu's avatar
      deniztopcu
      Copper Contributor
      I did not implement what you said. I uploaded my excel file in its original form. I have re-uploaded the file if you want to help.
      • Patrick2788's avatar
        Patrick2788
        Silver Contributor

        deniztopcu 

        Thanks for sharing the workbook.

         

        Here is the formula. I kept your filter but added CHOOSEROWS to pull the rows that match your subtotals.  The subtotals are stored as a constant in the named item 'rowheaders'

        =LET(filtered,FILTER(Combined_tblFinancials[[itemDescTr]:[2021/6]],Combined_tblFinancials[Symbol]=B1),CHOOSEROWS(filtered,XMATCH(RowHeaders,TAKE(filtered,,1))))

         

Resources