Need help to count number of rows with same value and copy that sum multiple times as value in another cell

ea2146

New Member
Joined
Apr 9, 2012
Messages
30
Hello,
I have a problem that has stumped me. I would be eternally grateful if someone could help me.
Problem: “total_members” value does not include people with “Name” of “AAA”. For example, in expedition #2, you can see that total members is listed as 4, when it should say 5. However, not all expeditions are incorrect. For example, expedition #1 has no errors because there are no members with name “AAA”. Complicating things further, some expeditions have more than one “AAA” member. For example, expedition #6 has two “AAA” members and therefore, the total members for expedition #6 should be 3 instead of 1. In short, I need the values in the “total_members” column to reflect the total number of names in the “Name” column for that expedition. Currently, the “total_members” column = (total members - # of “AAA”s). Does this make sense. I would really appreciate it if someone could provide a formula to correct this. Thanks so much!!
Name
expedition
total_members
Burton
1
5
Crofts
1
5
Halstead
1
5
Moore
1
5
West
1
5
AAA
2
4
Lavish
2
4
Metchetina
2
4
Prokopenko
2
4
P****yn
2
4
Amann
3
4
Amann
3
4
Duenser
3
4
Fritsche
3
4
Brown
4
6
Fioretti
4
6
Henshaw
4
6
Lambert
4
6
Lane
4
6
Zangrilli
4
6
Gonzalez Gonzalez
5
4
Lopez Gros
5
4
Pujol Ferrusola
5
4
Rubiella
5
4
AAA
6
1
AAA
6
1
Karlsson
6
1
Buccella
7
4
Cavallaro
7
4
Feijoo
7
4
Ogliengo
7
4

<tbody>
</tbody>
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Enter
Code:
=COUNTIF($B:$B,B1)
into C1 and copy all the way down.

J.Ty.
 
Upvote 0

Forum statistics

Threads
1,215,140
Messages
6,123,269
Members
449,093
Latest member
Vincent Khandagale

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