Counting locations per name

Spreadsheetz

New Member
Joined
Jun 12, 2016
Messages
22
Hello!

Hopefully this is an easy one.. I have a spreadsheet with a number of names in one column, and locations in another column. I'm hoping to find a formula that can tell me how many times the location shows up per person.

For example:[TABLE="width: 500"]
<tbody>[TR]
[TD]location[/TD]
[TD]name[/TD]
[/TR]
[TR]
[TD]Calfornia[/TD]
[TD]Jeff[/TD]
[/TR]
[TR]
[TD]Maine[/TD]
[TD]Mary[/TD]
[/TR]
[TR]
[TD]California[/TD]
[TD]Jeff[/TD]
[/TR]
[TR]
[TD]Michigan[/TD]
[TD]Mary[/TD]
[/TR]
[TR]
[TD]Michigan[/TD]
[TD]Mary[/TD]
[/TR]
[TR]
[TD]Wyoming[/TD]
[TD]Jeff[/TD]
[/TR]
</tbody>[/TABLE]

Is there a function to use that could quickly spit out something like this:
[TABLE="width: 500"]
<tbody>[TR]
[TD]location[/TD]
[TD]name[/TD]
[TD]count[/TD]
[/TR]
[TR]
[TD]california[/TD]
[TD]jeff[/TD]
[TD]2 california, 1 wyoming[/TD]
[/TR]
[TR]
[TD]maine[/TD]
[TD]mary[/TD]
[TD]2 michigan, 1 maine[/TD]
[/TR]
[TR]
[TD]california[/TD]
[TD]jeff[/TD]
[TD]2 california, 1 wyoming[/TD]
[/TR]
[TR]
[TD]Michigan[/TD]
[TD]Mary[/TD]
[TD]2 michigan, 1 maine[/TD]
[/TR]
[TR]
[TD]Michigan[/TD]
[TD]mary[/TD]
[TD]2 michigan, 1 maine[/TD]
[/TR]
[TR]
[TD]Wyoming[/TD]
[TD]Jeff[/TD]
[TD]2 california, 1 wyoming[/TD]
[/TR]
</tbody>[/TABLE]

Just a count of how many times the value in the location column occurs per name.

Thanks in advance!!
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
[TABLE="class: grid"]
<tbody>[TR]
[TD][/TD]
[TD]
A
[/TD]
[TD]
B
[/TD]
[TD]
C
[/TD]
[TD]
D
[/TD]
[TD]
E
[/TD]
[TD]
F
[/TD]
[TD]
G
[/TD]
[TD]
H
[/TD]
[TD]
I
[/TD]
[/TR]
[TR]
[TD]
1
[/TD]
[TD]location[/TD]
[TD]name[/TD]
[TD][/TD]
[TD]name[/TD]
[TD]location[/TD]
[TD]California[/TD]
[TD]Michigan[/TD]
[TD]Wyoming[/TD]
[TD]Maine[/TD]
[/TR]
[TR]
[TD]
2
[/TD]
[TD]California[/TD]
[TD]Jeff[/TD]
[TD][/TD]
[TD]Jeff[/TD]
[TD][/TD]
[TD]
2​
[/TD]
[TD]
0​
[/TD]
[TD]
1​
[/TD]
[TD]
0​
[/TD]
[/TR]
[TR]
[TD]
3
[/TD]
[TD]Maine[/TD]
[TD]Mary[/TD]
[TD][/TD]
[TD]Mary[/TD]
[TD][/TD]
[TD]
0​
[/TD]
[TD]
1​
[/TD]
[TD]
0​
[/TD]
[TD]
2​
[/TD]
[/TR]
[TR]
[TD]
4
[/TD]
[TD]California[/TD]
[TD]Jeff[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
5
[/TD]
[TD]Maine[/TD]
[TD]Mary[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
6
[/TD]
[TD]Michigan[/TD]
[TD]Mary[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
7
[/TD]
[TD]Wyoming[/TD]
[TD]Jeff[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

f2=COUNTIFS($B$2:$B$7,$D2,$A$2:$A$7,F$1) copy across and down
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,304
Members
452,633
Latest member
DougMo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top