Use GROUPBY in Excel to add Blank Rows/Cols After Each Group

Copper Contributor

Use GROUPBY in Excel to add Blank Rows/Cols After Each Group

to add blank Rows:
=LET(
    a, GROUPBY(B4:D13, E4:F13, SUM, , 2),
    DROP(IF(BYROW(--(a = ""), SUM), "", a), -2)
)

to add blank Cols:
=TRANSPOSE(
    LET(
        a, GROUPBY(B4:D13, E4:F13, SUM, , 2),
        DROP(IF(BYROW(--(a = ""), SUM), "", a), -2)
    )
)

 

 

gr2024-02-23_131645.png



2 Replies

@DrExcel_Excel_MVP 

Nice idea. If to use logic directly

=LET(
    a, GROUPBY(B4:D13, E4:F13, SUM, , 2),
    DROP( IF( BYROW( a = "", OR ), "", a), -2)
)
many thanks for this great contribution