Sequential Numbering Based on Data in Cells

jharbold

New Member
Joined
Feb 17, 2018
Messages
12
Hello,

I am attempting to do the following and would appreciate any help:

I have a spreadsheet that looks like the following
ABCABC-001
DEFDEF-001
ABCABC-002
ABCABC-003
DEFDEF-002

<tbody>
</tbody>

I manually enter in the information in the first column. In the second column, I need to create an equation that will automatically pull over the data in the first column, add a "-", and then create sequential numbering based on the values in column A. For example, in the third row, I need the equation to know that "ABC" is entered in the first column, so it needs to search above in the second column to see what the last "ABC" value was (in this case ABC-001), and then return "ABC-002" (001+1).

To make matters a bit more complicated, the values in the first column may not always be 3 characters as shown here, but the numbers and the letters in the second column will always be separated by a "-".

I appreciate the help!
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
How about
=A2&"-"&TEXT(COUNTIF(A$2:A2,A2),"000")
and copied down
 
Upvote 0

Forum statistics

Threads
1,214,636
Messages
6,120,666
Members
448,977
Latest member
moonlight6

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