Formula to append letters in alphabetical order to unique ID

Tashat

Board Regular
Joined
Jan 12, 2005
Messages
135
Office Version
  1. 365
Platform
  1. Windows
Hi All

I have a spreadsheet with Activity IDs and with each activity there could be 1 or more associated Actions. I would like a formula to generate in column B which generates Unique Action IDs based on the Activity ID, as shown below. So that the first action for a given ID ends in "a", the second in "b" and onwards through the alphabet then to "aa", "ab", "ac" etc. Can someone help me with a formula for B2:B10 (onwards) please?

Book3
AB
1Activity IDAction ID
2ACT000001ACT000001a
3ACT000002ACT000002a
4ACT000003ACT000003a
5ACT000001ACT000001b
6ACT000049ACT000049a
7ACT000021ACT000021a
8ACT000021ACT000021b
9ACT000021ACT000021c
10ACT000021ACT000021d
Sheet1
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
How about
Excel Formula:
=A2&SUBSTITUTE(ADDRESS(1,COUNTIFS(A$2:A2,A2),4),1,"")
 
Upvote 0
Upvote 0
How about
Excel Formula:
=A2&SUBSTITUTE(ADDRESS(1,COUNTIFS(A$2:A2,A2),4),1,"")
Thank you so much as always! This works perfectly. Seems to be the same as JasonB75 :)
 
Upvote 0
Seems to be the same as JasonB75
It is, (although his will return lower case letters & mine will return caps) he was just quicker than me. ;)

Glad we could help & thanks for the feedback.
 
Upvote 0
I have one more question if it's appropriate to ask in this thread. Based on the IDs above, I have another sheet where the user can select the Activity Number in a data validation dropdown list - e.g. ACT000001 and then can select the linked Action Number in the next column. Is there a way of shrinking the drop-down list in the action number column to only present the user with the possible Action Numbers linked with that Activity ID, so the data validation list in the second column is dependent on what the user enters in the first column? e.g.

If the user selects ACT00001 from the drop down list, then the next dropdown list only gives them the choice of ACT000001a or ACT000001b
 
Upvote 0
As that's a totally different question, it needs a new thread. Thanks
 
Upvote 0

Forum statistics

Threads
1,215,050
Messages
6,122,868
Members
449,097
Latest member
dbomb1414

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