Formula to Number in Order Each Sub Set Out of a Large Data Set of Duplicate Values

Sarkman22

New Member
Joined
Aug 8, 2014
Messages
25
Hello all- thanks for reading and any help....

I have a large data set of around 75,000 numbers. There are around 3,500 unique numbers, with varying quantities of duplicates. My data is sorted in ascending order so all duplicates are in order. What I would like to do is write a formula to have Excel tell me which duplicate value the number is.

E.g. (also shown below) I have the number 111 and it is listed 5 times. I want the first 111 to say "1",the second 111 to say "2", and so forth. But once I get to the next unique value, 222, I want the numbering to start over with 1.

Does anyone know how to automate this using formulas? I have put a small example of what I want below to help clarify.

NOTE: It is very important that the numbers (column B) stay in this exact order.

Thanks and I hope this explanation is clear enough!

Andy

COLUMN A COLUMN B
1 111
2 111
3 111
4 111
5 111
1 222
2 222
3 222
1 333
1 444
2 444
3 444
4 444
1 555
2 555
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Welcome to the board.

Place a 1 in cell A1. Then place this formula in A2 and copy down.

=IF(B1=B2,1+A1,1)
 
Upvote 0
Wow, thank you so much for the quick reply bbott! This worked beautifully.

I knew there was a relatively simple solution, just couldn't think on a Friday :)
 
Upvote 0

Forum statistics

Threads
1,214,886
Messages
6,122,093
Members
449,064
Latest member
Danger_SF

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