[![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"))

```
You can use formula like this in the 1st Column

```
=if(EQ(B2,),"", A1+1)

```

This will check if column 2 is empty or not if, it isn't then it'll set value of cell just above it plus one.

NOTE : For 1st cell you'll need to set value 20180001 manually and apply this formula to rest of the whole column one cells.