Reputation: 129
I am using Excel 2010. I have three tables: Code, Name and Region.
I would like to populate Region table with the values you can see. I would like to count the number of instances where Region appears in the Name Table, and what code is attributed to the name in the Code table.
I understand a lookup column on the Name Table with the Code would be sensible idea however, I'm curious as to whether this could be done without.
Thanks in advance for reading.
Upvotes: 0
Views: 49
Reputation: 152465
use this:
=SUMPRODUCT(COUNTIFS(Code[[Name]:[Name]],Name[[Name]:[Name]],Code[[Code]:[Code]],Region[[#Headers],[A]])*(Name[[Region]:[Region]]=Region[@[Region]:[Region]]))
Upvotes: 1
Reputation: 1658
Assuming the left top cell in your picture is A1, the following formula should be pasted in H3 and can be copied pasted in the third table.
=COUNTIFS($B:$B;H$1;$E:$E;$G2)
Upvotes: 0