need formula, for counting and deleting duplicate entries

sidd0053

New Member
Joined
Jun 8, 2018
Messages
9
I want excel to automatically count a duplicate, show the value (number of duplicates) in another cell and then delete the duplicate while still maintaining that value.

Basically the algorithm would be:
1.Excel sees there's a duplicate.
2.Plus 1 to the column B of the first occurrence.
3.Delete the duplicate while still maintaining the value of the B column in the first occurrence.
4.Repeat the process if there is more duplicate entry.
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
suppose you have data in column A starting from A2, enter the formula '=IFERROR(MATCH(A2,$A$1:A1,0),0)' in B2 and drag down. filter all the non-zeros in column B, and right click and then select 'Delete row' option.
 
Upvote 0
suppose you have data in column A starting from A2, enter the formula '=IFERROR(MATCH(A2,$A$1:A1,0),0)' in B2 and drag down. filter all the non-zeros in column B, and right click and then select 'Delete row' option.

It didn't really work out,

Job Standard Training02
Job Standard Training22942
Town hall15503
Town hall15503
Appeals Branch22922
Appeals Conference01
WR Staff Meeting01
Nancy02
RAD Training01
TD1055 Design and Content Building04
TD1055 Design and Content Building23034
TD1055 Design and Content Building23034
TD1055 Design and Content Building23034
Presentation01
T319492
ADA Forum / Nicole Blanchard02

<colgroup><col span="2"><col></colgroup><tbody>
</tbody>

Column B is the formula that you gave, Column C is how many duplicates there are with the formula that I used. Except with my formula if I delete the duplicate entries in column 'A' than the # shown in 'C' changes accordingly. TD1055 DESIGN is showing 2303, its not possible that there are that many entries for it.
 
Upvote 0
Say your data are in A2:A100

Steps
Formula in B2 copied down until B100
=COUNTIF(A:A,A2)-1

Select B2:B1100
copy and paste only values

Select A2:B100
Data > Remove duplicates

M.
 
Upvote 0
Say your data are in A2:A100

Steps
Formula in B2 copied down until B100
=COUNTIF(A:A,A2)-1

Select B2:B1100
copy and paste only values

Select A2:B100
Data > Remove duplicates

M.

This works for me, thank you.

Just wondering as to why the "-1" in the formula?
 
Upvote 0
You are welcome. Thanks for the feedback.

About -1
It is not necessary - thought you wanted to count only when there was a duplicate

M.
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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