Forum Discussion

DrExcel_Excel_MVP's avatar
DrExcel_Excel_MVP
Copper Contributor
Feb 25, 2024

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

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)
    )
)

 

 



Resources