Formula to append numbers in order to unique ID

Tashat

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

I'm looking for a formula for column H in the example below. With some help from the lovely people on here, I managed to get this to work in column E, but now I need a similar formula for column H. I want column H to automatically generate an Action ID based on what the user enters in the adjacent cell in column G - Interaction ID. The interaction ID in column G can be repeated and I want the formula in column H to append a number (making it unique) to the end of the ID. Each time the Interaction ID is repeated, it appends the next number in order, as per the example below. I have tried to modify the formula in Column E to see if I can get that to work, but I don't fully understand what each part of the formula is doing, so my efforts so far have been in vain. Any help would be appreciated.

Fruit Example.xlsm
DEFGH
1Sheet 1Sheet 2
2Activity IDInteraction IDInteraction IDAction ID
3ACT_1ACT_1AACT_1AACT_1A_1
4ACT_1ACT_1BACT_1AACT_1A_2
5ACT_3ACT_3AACT_1AACT_1A_3
6ACT_1ACT_1CACT_1BACT_1B_1
7ACT_49ACT_49AACT_1BACT_1B_2
8ACT_21ACT_21AACT_49AACT_49A_1
9ACT_21ACT_21BACT_21AACT_21A_1
10ACT_21ACT_21CACT_21BACT_21B_1
11ACT_21ACT_21DACT_21BACT_21B_2
12ACT_21ACT_21EACT_7AACT_7A_1
13ACT_21ACT_21FACT_21FACT_21F_1
14ACT_7ACT_7AACT_21FACT_21F_2
15ACT_21FACT_21F_3
16ACT_21DACT_21D_1
Sheet3
Cell Formulas
RangeFormula
E3E3=D3&SUBSTITUTE(ADDRESS(1,COUNTIFS(D3:D$3,D3),4),1,"")
E4:E14E4=D4&SUBSTITUTE(ADDRESS(1,COUNTIFS(D$3:D4,D4),4),1,"")
Cells with Conditional Formatting
CellConditionCell FormatStop If True
G16:H16Cellcontains an errortextNO
G15:H15Cellcontains an errortextNO
G7Cellcontains an errortextNO
G6Cellcontains an errortextNO
G5Cellcontains an errortextNO
G4Cellcontains an errortextNO
G3:H14Cellcontains an errortextNO
E3:E14Cellcontains an errortextNO
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
How about in H3 filled down
Excel Formula:
=G3&"_"&COUNTIFS(G$3:G3,G3)
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,305
Members
452,633
Latest member
DougMo

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