# Formula for Counting Data with Duplicates

1. ## Formula for Counting Data with Duplicates

Hi everyone, please help me solve this problem. I have a spreadsheet that I am trying to automate the counting but it seems not working.

I am using countif to automate the counting but it seems not working.

=COUNTIF(\$A\$3:\$A4,A3)
I have attached a sample of what I am after. In the data, the red ones in column B are wrong (using the countif formula), the correct count should be like in column C.

Untitled.png

If it is possible that anyone could help me out, that would be great.

Cheers,

2. ## Re: Formula for Counting Data with Duplicates

Try:
Formula:
`Please Login or Register  to view this content.`

3. ## Re: Formula for Counting Data with Duplicates

Originally Posted by TMS
Try:
Formula:
`Please Login or Register  to view this content.`
thanks for the quick reply. below is the result.

Untitled.png

4. ## Re: Formula for Counting Data with Duplicates

Try this in B2:
=IF(A2<>A1,COUNTIF(\$A\$3:\$A3,A2),B1)
Copy down

5. ## Re: Formula for Counting Data with Duplicates

Your data appears to start in row 2, not row 3, so it would be:
Formula:
`Please Login or Register  to view this content.`

6. ## Re: Formula for Counting Data with Duplicates

Untitled.png

Originally Posted by Phuocam
Try this in B2:
=IF(A2<>A1,COUNTIF(\$A\$3:\$A3,A2),B1)
Copy down
got the result I wanted, i just mistakenly entered the formula in column E

Originally Posted by Phuocam
Try this in B2:
=IF(A2<>A1,COUNTIF(\$A\$3:\$A3,A2),B1)
Copy down
the result is in column D

7. ## Re: Formula for Counting Data with Duplicates

Originally Posted by Phuocam
Try this in B2:
=IF(A2<>A1,COUNTIF(\$A\$3:\$A3,A2),B1)
Copy down
got it, thanks very much.

8. ## Re: Formula for Counting Data with Duplicates

You're welcome.

9. ## Re: Formula for Counting Data with Duplicates

Originally Posted by Phuocam
You're welcome.
sir, from the image below. i would like to know if it is possible to get the value in manual column using a formula? the formula column was using the formula you have given me.

Untitled.png

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1