Forum Discussion
Norman_McIlwaine
Aug 18, 2023Brass Contributor
Need help to resolve Excel Formula using Let,Take,index,Sort,Unique,HSTACK,MMULT,TOROW,MONTH.
I am trying to add 5 additional columns to the function but can get only a $value: Function : =LET(r,B1:G8,m,6,a,TAKE(r,,1),b,INDEX(r,,2),c,INDEX(r,,3),d,INDEX(r,,4),e,INDEX(r,,5),f,INDEX(r,,...
- Sep 07, 2023
Thank you. Do I understand correctly that csv62719 is you source file. If to avoid Power Query we copy/paste data from it into the sheet in main file, here by formula create massaged range and based on it and month/year/monthid parameters create aggregated result. Workflow is correct?
SergeiBaklan
Aug 18, 2023MVP
In general your formula
=LET(
r, B1:G8,
m, 8,
a, TAKE(r, , 1),
b, INDEX(r, , 2),
c, INDEX(r, , 3),
d, INDEX(r, , 4),
e, INDEX(r, , 5),
f, INDEX(r, , 6),
g, INDEX(r, 7),
u, SORT(UNIQUE(a)),
HSTACK(u, MMULT(--(TOROW(a) = u), (MONTH(b) = m) * c))
)
works, e.g.
but I was not able to paste your sample into the grid and didn't catch what exactly you try to do.