Unique Identifier

Yecart77

New Member
Joined
Nov 8, 2022
Messages
18
Office Version
  1. 365
  2. 2021
  3. 2019
  4. 2016
Platform
  1. Windows
Hi All,

Thank you in advance for any guidance anyone can give. I think it will be simple but I cannot work it out.
Sample photo (couldn't get XL2BB to work) created with 365 but formula need for a doc on 2016.
Wanting to create a unique identifier in Column A for a data set that I want to be in the format of:
ABCD-0001/2023 <-- with four numbers to the left of the forward slash at all times, even if the number is 1,2 or 3 digits.

="ABCD-"&""&ROW()-ROW($A$1)&"/"&$K$1
Formula I currently have, noting K1 has the /year parked in it.

How do I 'pad' the numbers to be always four digits, nested within a ROW formula.

I have had a go at using TEXT and REPT but cannot get it to work.
 

Attachments

  • unique identifier.png
    unique identifier.png
    8.7 KB · Views: 3

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Still using the TEXT function as below:
Excel Formula:
="ABCD-"&""&TEXT(ROW()-ROW($A$1),"0000")&"/"&$K$1
 
Upvote 0
Solution
Thank you so much Georgiboy! I appreciate your time. :)
 
Upvote 0

Forum statistics

Threads
1,215,054
Messages
6,122,895
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