Forum Discussion
NativeWest
Jul 08, 2024Copper Contributor
Macro to copy rows to sheet2 based on value in row
Hello, Hoping someone can help with a formula or macro to copy data in rows to sheet2 based on the value in the row (column F). Column F does not need to come over to sheet 2 but the other column...
HansVogelaar
Jul 08, 2024MVP
Based on How to repeat values X times in excel | LAMBDA: enter the following formula in A2 on Sheet2
=LAMBDA(value, repeat, CHOOSEROWS(value, XMATCH(SEQUENCE(SUM(repeat)), SCAN(, repeat, LAMBDA(a, b, a+b)), 1)))(Sheet1!A2:E8, Sheet1!F2:F8)
Adjust the ranges A2:E8 and F2:F8 as needed.
- NativeWestJul 08, 2024Copper ContributorThat does it! Thank you so much!