# Unique Id number

#### LValencia

##### New Member
I would like to create an automatic unique Id number in cell A1, the data would come from B1, C1 and D1. B and C are numbers and D is text. The cell data looks like this B1=20, C1=24, D1=GVI. The auto number would look like this 2024GVI. I have tried several ideas but get errors since I have a text field.
I appreciate any help

### Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

#### keiserj

##### Board Regular
Something like this??

Code:
``=CONCATENATE(B1,C1,D1)``

#### FDibbins

##### Well-known Member
Something like this??

Code:
``=CONCATENATE(B1,C1,D1)``

This will work, but do you always only have 2-digit numbers?
B1=5
C1=125
D1=Text
A1=5125text
or
B1=51
C1=25
D1=Text
A1=5125Text

I would suggest this way...
=B1&" "&C1&" "&D1
This will put a space between each piece to make sure you have 5 125 Text or 51 25 Text

#### LValencia

##### New Member
Yes I will only have two digits in either field. Second field is identifying a calendar requirement in months. How would I make a dash show in the number instead of a space?
LV

#### keiserj

##### Board Regular
This will work, but do you always only have 2-digit numbers?
B1=5
C1=125
D1=Text
A1=5125text
or
B1=51
C1=25
D1=Text
A1=5125Text

I would suggest this way...
=B1&" "&C1&" "&D1
This will put a space between each piece to make sure you have 5 125 Text or 51 25 Text

=B1&"-"&C1&"-"&D1

Or

=CONCATENATE(B1,"-"C1,"-",D1)

#### FDibbins

##### Well-known Member
Second field is identifying a calendar requirement in months.
The 1st 9 months could all only still only have 1 digit?

=B1&"-"&C1&"-"&D1

#### LValencia

##### New Member
Got it worked exactly like I wanted, thanks FD

#### FDibbins

##### Well-known Member
Awesome, happy to help

#### LValencia

##### New Member
Ok correction, the months are like 24, 48, 60, 72... But what i forgot is I will have multiple numbers with the same starting information so I need to include a count number after the auto number. Example 20-24-GVI-001, 20-24-GVI-002. Each of these is a specific task within the group.
Thanks

#### FDibbins

##### Well-known Member
OK try this...
 A​ B​ C​ D​ 1​ 20-24-GVI-001 20​ 24​ GVI 2​ 20-24-GVI-002 20​ 24​ GVI 3​ 20-24-GVI-003 20​ 24​ GVI 4​ 20-48-GVI-001 20​ 48​ GVI 5​ 20-48-GVI-002 20​ 48​ GVI 6​ 20-48-GVI-003 20​ 48​ GVI
=B1&"-"&C1&"-"&D1&"-"&TEXT(COUNTIFS(\$B\$1:B1,B1,\$C\$1:C1,C1,\$D\$1:D1,D1),"000")
copied down

Replies
8
Views
352
Replies
1
Views
156
Replies
1
Views
248
Replies
1
Views
598
Replies
6
Views
2K

1,191,282
Messages
5,985,740
Members
439,978
Latest member
Mr930R

### 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.

### Which adblocker are you using?

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

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