Create unique ID based off of adjacent cell

kod2th3e

Board Regular
Joined
Apr 2, 2008
Messages
87
I am trying to use a forumla to look at the value in column b then create a unique id in column a based off of that value. In the table below I have a 3 digit value (in column B) that may be repeated any given number of times and if so I want the corresponding text in column "A" to equal that value with a "-1", "-2", etc after it depending how how many times the number has been repeated. Thanks in advance for any/all help.

Col A
Col B
114-1
114
114-2
114
114-3
114
114-4
114
115-1
115
115-2
115
116-1
116
116-2
116
116-3
116

<tbody>
</tbody>
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Assuming your data begins in row 1, place this formula in cell A1 and copy down:
Code:
=B1 & "-" & COUNTIF(B$1:B1,B1)
 
Upvote 0

Forum statistics

Threads
1,215,444
Messages
6,124,892
Members
449,194
Latest member
JayEggleton

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