Forum Discussion
Gopal_Gope
May 14, 2024Copper Contributor
Need formula for help Excel
Same data in different columns has to be come to one column against the cell Please find the example in attachment
Patrick2788
May 14, 2024Silver Contributor
I've created a function to accomplish this task:
Organize Lambda
=LAMBDA(matrix,LET(
ID, TAKE(matrix, , 1),
uID, SORT(UNIQUE(ID)),
TotalA, INDEX(matrix, , 2),
TotalB, INDEX(matrix, , 3),
descrip, DROP(matrix, , 3),
pivot, LAMBDA(acc, v,
LET(
record, FILTER(matrix, ID = v),
a, TAKE(record, 1, 1),
x, SUM(INDEX(record, , 2)),
y, SUM(INDEX(record, , 3)),
details, DROP(TAKE(record, 1), , 3),
VSTACK(acc, HSTACK(a, x, y, details))
)
),
DROP(REDUCE("", uID, pivot), 1)
))
All you have to do is add the above formula (from line 2 and below) to the name manager as a named item called "Organize". You can then call the function at the sheet level: