Peter Davison
Active Member
- Joined
- Jun 4, 2020
- Messages
- 451
- Office Version
- 365
- Platform
- Windows
Fluff very kindly helped me with the formula below, which I have adapted to another sheet in excel.
The formula
=IFERROR(LET(d,SORT(UNIQUE(CHOOSECOLS(FILTER('Data Analysis'!$G$12:$DG$1000,'Data Analysis'!$G$12:$G$1000<>""),5,6,1,2,95,96,97,98))),u,UNIQUE(INDEX(d,,2)),SORTBY(VSTACK(d,CHOOSE(SEQUENCE(,8),u,"","","",SUMIFS('Data Analysis'!CW:CW,'Data Analysis'!L:L,u),SUMIFS('Data Analysis'!CX:CX,'Data Analysis'!L:L,u),SUMIFS('Data Analysis'!CY:CY,'Data Analysis'!L:L,u),SUMIFS('Data Analysis'!CZ:CZ,'Data Analysis'!L:L,u))),VSTACK(SEQUENCE(ROWS(d)),XMATCH(u,INDEX(d,,2),0,-1)))),"")
is in Cell B12 and produces the result below.
I would like to get the sub total row name (BAKERY) to appear in both cells B18 and C18, but I can't see in the formula how it gets into Cell B12 currently.
If you can help that would be greatly appreciated.
The formula
=IFERROR(LET(d,SORT(UNIQUE(CHOOSECOLS(FILTER('Data Analysis'!$G$12:$DG$1000,'Data Analysis'!$G$12:$G$1000<>""),5,6,1,2,95,96,97,98))),u,UNIQUE(INDEX(d,,2)),SORTBY(VSTACK(d,CHOOSE(SEQUENCE(,8),u,"","","",SUMIFS('Data Analysis'!CW:CW,'Data Analysis'!L:L,u),SUMIFS('Data Analysis'!CX:CX,'Data Analysis'!L:L,u),SUMIFS('Data Analysis'!CY:CY,'Data Analysis'!L:L,u),SUMIFS('Data Analysis'!CZ:CZ,'Data Analysis'!L:L,u))),VSTACK(SEQUENCE(ROWS(d)),XMATCH(u,INDEX(d,,2),0,-1)))),"")
is in Cell B12 and produces the result below.
I would like to get the sub total row name (BAKERY) to appear in both cells B18 and C18, but I can't see in the formula how it gets into Cell B12 currently.
If you can help that would be greatly appreciated.