[![screenshot of my google spreadsheet](https://i.stack.imgur.com/WDUOp.png)](https://i.stack.imgur.com/WDUOp.png)

I do have a problem when I'm going to submit my form, i dont have any idea to add this format "2018-00XX" automatically when someone submitted a form and the data will be transferred to google spreadsheet.

As you can see the picture, I gave you an example of how the control number should be entered automatically when the user submitted a form from google form.

Thanks in advance to anyone can answer my problem!
['https://Stackoverflow.com/questions/48374126', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5330802/']
A2: 

```
=ARRAYFORMULA("201800"&text(ROW(A$1:INDEX(B:B,COUNTA(B:B)-1)),"00"))

```
With *2018* hardcoded in,

```
=text(row(1:1), "\2\0\1\80000")

```

Using the date from column B,

```
=year(B2)&text(COUNTIFS(B$2:B2, ">="&date(year(B2), 1, 1), B$2:B2, "<"&date(year(B2)+1, 1, 1)), "0000")

```