I am attempting to exclude values my countif formula has already counted, and instead insert a value such as "Already counted".
I need to count how many times a specific item appears in a column, which I used the basic countif formula for: =COUNTIF(A:A,A2). It returned these results:
Name # of Name
Mike 2
Sally 2
John 3
Kim 2
Jose 2
Sally 2
John 3
Brenda 1
John 3
Jose 2
Kim 2
Mike 2
(Column A is the "Name", Column B is the formula column "# of Name".)
OK, great. The issue is when the second occurrence of "Sally" happens, it counts the word again. I would like to ignore it because it has already been counted, and instead insert another value, such as "Already Counted". Thank you for your help in advance.
Use MATCH to test if first in the list:
You can
COUNTIF
for the limited range ending with the current row, and, if more than1
, you know it was already countedEDIT: Having just seen it, I like Scott's solution also.