FryGirl
Well-known Member
- Joined
- Nov 11, 2008
- Messages
- 1,372
- Office Version
- 365
- 2016
- Platform
- Windows
I've searched for the possible answer, but I'm stuck as to why I can't get the correct result, in column H. Column D/E are the expected results. I'm trying to count the unique values in column B by the unique in column A.
0247 Dynamic total row - Complete.xlsx | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | |||
1 | Hdr1 | Hdr2 | Hdr1 | Hdr2 | Hdr1 | Hdr2 | ||||
2 | Apple | Car | Apple | 2 | Apple | 1 | ||||
3 | Apple | Car | Orange | 3 | Orange | #N/A | ||||
4 | Apple | Plane | ||||||||
5 | Apple | Plane | ||||||||
6 | Apple | Plane | ||||||||
7 | Orange | Bus | ||||||||
8 | Orange | Bus | ||||||||
9 | Orange | Rocket | ||||||||
10 | Orange | Rocket | ||||||||
11 | Orange | Boat | ||||||||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
G1:H3 | G1 | =LET(Header1,UNIQUE($A$2:$A$11),Header2,COUNTA(UNIQUE(FILTER($B$2:$B$11,$A$2:$A$11=Header1))),VSTACK(HSTACK("Hdr1","Hdr2"),HSTACK(Header1,Header2))) |
D2:D3 | D2 | =UNIQUE(Sheet1!$A$2:$A$11) |
E2:E3 | E2 | =COUNTA(UNIQUE(FILTER(Sheet1!$B$2:$B$11,Sheet1!$A$2:$A$11=D2))) |
Dynamic array formulas. |