Duplicate Sort by Numbers

markman2

New Member
Joined
Nov 13, 2009
Messages
12
Hello fellow excelers, I am facing an issue that i can't get around easily. I have data and i would like to number duplicates next to the data so that i can append the cells that are duplicates easily. The data i have is in the following cell format -

Red
Red
Red
Green
Green
Green
Green
Blue
Yellow
Yellow

What i would like is to output serial next to the cells based on the cell uniqueness as in -

Red 1
Red 2
Red 3
Green 1
Green 2
Green 3
Green 4
Blue 1
Yellow 1
Yellow 2

Kindly let me know if there's something to be done here. Thanks, Mark.
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Assuming your data is in A1:A10, try:

Code:
=COUNTIF(A$1:A1,A1)

In B1, and copy down.

Matty
 
Upvote 0
MIND BLOWN!
thank you, great technique! so flawless

To demonstrate what i was up to - i was using =COUNTIF(E:E,E2)>1, then >2 then >3 then >4 in different rows, and getting True/False, then changing the True to that number... i love excel!
 
Upvote 0
MIND BLOWN!
thank you, great technique! so flawless

To demonstrate what i was up to - i was using =COUNTIF(E:E,E2)>1, then >2 then >3 then >4 in different rows, and getting True/False, then changing the True to that number... i love excel!

Glad to help. Keep EXCELing...

Matty
 
Upvote 0
Assuming your data is in column A, try these formulas in columns B and C respectively:

=IF((A3=A2),B2+1,1) =A3&" "&B3
 
Upvote 0

Forum statistics

Threads
1,214,611
Messages
6,120,509
Members
448,967
Latest member
screechyboy79

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