google-sheetsgoogle-sheets-formulaarray-formulassubtotal

How to use Subtotal in a Filter Data with ArrayFormula


I've created a simple table and trying to sequence datas with Subtotal (CountA) in my Filter Datas.

Datas

A: Subtotal with ArrayFormula

B: Subtotal without ArrayFormula

Here is my exp: https://docs.google.com/spreadsheets/d/1SOiu0YHFLZB50d7h7gWQeobxKBto_n3llm-Ej1MazWU/edit?usp=sharing


Solution

  • Use MAP() then SUBTOTAL() inside it.

    =MAP(E2:INDEX(E2:E,COUNTA(E2:E)),LAMBDA(x,SUBTOTAL(3,E2:INDEX(E2:E,ROW(x)-1))))
    

    enter image description here