Forum Discussion
DrExcel_Excel_MVP
Nov 19, 2023Copper Contributor
Insert a Blank Row After Every Change of Product
Insert a Blank Row After Every Change of Product let's do it step by step: Step by Step #1 =SEQUENCE(ROWS(B4:E13)) #2 =B4:B13=B5:B13 #3 =DROP(H4#,-1) Whic...
djclements
Nov 19, 2023Bronze Contributor
Lorenzo and DrExcel_Excel_MVP Good ones! Just for fun, here's a couple more:
=LET(
rng, A2:D11,
v, TAKE(rng,, 1),
r, ROWS(rng),
s, SEQUENCE(r),
n, FILTER(s, IFNA(v <> DROP(v, 1), 0)),
SORTBY(EXPAND(rng, r + ROWS(n),, ""), VSTACK(s, n))
)
- OR -
=LET(
rng, A2:D11,
v, TAKE(rng,, 1),
s, SEQUENCE(ROWS(rng)),
DROP(SORT(IFNA(HSTACK(VSTACK(s, FILTER(s, IFNA(v <> DROP(v, 1), 0))), rng), "")),, 1)
)
DrExcel_Excel_MVP
Nov 20, 2023Copper Contributor
many thanks for your contribution