Adding Sequential Numbering to a Non-Sequential List

Astayonix

New Member
Joined
Aug 5, 2014
Messages
3
I'm a bit stumped by this one. I'm trying to make a formula that will add sequential numbering to a non-sequential list. Here is an example of what I'm talking about.

Category
Category with Sequential Numbering
Match Result
D
D014
AA015
AA025
CC017
BB018
BB028
BB038
AA035
AA045
CC027
CC037
CC047
CC057
AA055

<colgroup><col><col><col></colgroup><tbody>
</tbody>

I've tried using the match function, and it groups the "like" categories (A's, B's, C's, and D's), but I'm unsure how to add the incremental numbering. I also need the first instance of every new category to start with 01 (A01, B01, C01, and D01) before the formula walks down the list and adds the next numerical increment to the next instance of that category's appearance. Any help and/or ideas rendered would be GREATLY appreciated!

-=Astayonix=-
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Just a thought assuming the letters are in column A

=A2&TEXT(COUNTIF($A$2:A2,A2),"00")
 
Upvote 0
Just a thought assuming the letters are in column A

=A2&TEXT(COUNTIF($A$2:A2,A2),"00")

Hi, Weazel! :)

Thank you for the response! I tried the COUNTIF, and while it was able to count the number of instances of each of the categories (per below), it doesn't anchor the first instance of each (A01, B01, C01, and D01), and it doesn't add the incremental numbering to each sequence (A01, A02, A03, A04, A05, etc.). The MATCH function is able to properly segregate the categories (A's, B's, C's, and D's), and the COUNT-IF returns the number of times that each category occurs in the list, but the sequential numbering is probably some type of hybrid use of both (??). This one is kind of sticky! Thank you very much for the input!

CategoryCategory with Sequential NumberingMatch ResultCount-If Result
DD014D01
AA015A05
AA025A05
CC017C05
BB018B03
BB028B03
BB038B03
AA035A05
AA045A05
CC027C05
CC037C05
CC047C05
CC057C05
AA055A05

<colgroup><col><col><col><col></colgroup><tbody>
</tbody>

-=Astayonix =-
 
Upvote 0
Hi, Weazel! :)

Thank you for the response! I tried the COUNTIF, and while it was able to count the number of instances of each of the categories (per below), it doesn't anchor the first instance of each (A01, B01, C01, and D01), and it doesn't add the incremental numbering to each sequence (A01, A02, A03, A04, A05, etc.).
Did you use the EXACT formula Weazel posted or did you attempt to modify it? His formula, exactly as posted, does exactly what you are describing you want for me when I test it against the data you posted.
 
Upvote 0
Did you use the EXACT formula Weazel posted or did you attempt to modify it? His formula, exactly as posted, does exactly what you are describing you want for me when I test it against the data you posted.

Hi, Rick!

You are correct! I had modified it a bit to include a specific range on the COUNTIF! It DOES work properly! It both anchors the 01 entry for each category and it sequentially numbers each addition to the category! This is AMAZING! Thank you both so much! I truly appreciate it!

-= Astayonix =-
 
Upvote 0

Forum statistics

Threads
1,216,113
Messages
6,128,904
Members
449,477
Latest member
panjongshing

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