Forum Discussion
denisepoirier
Jul 13, 2022Copper Contributor
Getting concat function to insert a specified number of digits
I am working on a Document Registry and each Document will be assigned a 3 digit number starting at 001. I have formatted the cell so it shows as a 3 digit number but when I use the concat function t...
- Jul 13, 2022
in H1:
=CONCAT(TEXT(DATE(A1,B1,1),"yyyy-mm"), "-", C1, "-", D1, "-", TEXT(E1,"000"), "-", F1)
if you run a recent version of Excel, in J1:
=TEXTJOIN("-",,TEXT(DATE(A1,B1,1),"yyyy-mm"), C1:D1, TEXT(E1,"000"), F1)
SergeiBaklan
Jul 13, 2022MVP
Is that exact format, i.e in 2022-1-QA-PUB-1-E numbers are always on second and fifth positions, or that could be different?
denisepoirier
Jul 13, 2022Copper Contributor
The format can be changed for sure, we are in development mode. The first 1 refers to the first month of the year which is preferred in a 2 digit numerical format. The second 1 indicated the sequential number and preferably it would be in a 3 digit numerical format. The dashes aren't necessary at all but having them there or removing them doesn't seem to change my ability to get those digits in there. Hope that all makes sense.