SOLVED

Count IF based on occurence

Copper Contributor

I would like to create a formula that counts how often a code appears in the Code column below. So for example the first row in the Count column would return a value of 3 because code "C123" appears three times in the code column and row 4 of the count column would return a value of 1 because "D34" appears once in the code column

 

CountCode
3C123
3C123
3C123
1D34
1F84
1W11
2R56
2R56
1F25
2G11
2G11
1 Reply
best response confirmed by dw700d (Copper Contributor)
Solution

@dw700d 

Let's say the codes are in B2:B12.

Enter the following formula in A2:

 

=COUNTIF($B$2:$B$12,B2)

 

and fill or copy down to A12.

1 best response

Accepted Solutions
best response confirmed by dw700d (Copper Contributor)
Solution

@dw700d 

Let's say the codes are in B2:B12.

Enter the following formula in A2:

 

=COUNTIF($B$2:$B$12,B2)

 

and fill or copy down to A12.

View solution in original post