Forum Discussion
wyboooo
Nov 08, 2022Copper Contributor
How to sum across tables
I've got three sheets.
Sheet1 has columns 'id' and 'hid.
Sheet2 has columns 'id' and 'cnt'.
Sheet3 has columns 'hid' and 'cnt'. The 'cnt' is calculated by adding the 'cnt' in Sheet2, where Sheet2.id = Sheet1.id and Sheet1.hid = Sheet3.hid.
For example:
id | hid |
1 | 111 |
2 | 111 |
3 | 111 |
4 | 222 |
5 | 222 |
6 | 222 |
7 | 222 |
id | cnt |
1 | 10 |
2 | 20 |
3 | 30 |
4 | 40 |
5 | 50 |
6 | 60 |
7 | 70 |
hid | cnt |
111 | 60 |
222 | 220 |
Can I use functions to get 'cnt' in Sheet 3?
- Riny_van_EekelenPlatinum Contributor
wyboooo Can give you three solutions. And there are probably more. See attached.
Power Query (A:B)
Power Pivot (D:E)
and dynamic array formulas (G:H)