Google Sheets – How to Apply Formula to Entire Column and Auto-Add to New Rows

google sheets

I need some kind of "autoincrement field" in my spreadsheet. I've added =ROW() formula to first column. But as I'm adding new rows – I have to apply this formula to new created rows as well. Is there any ways to do it automatically?

Best Answer

Use the following formula for that:

=ARRAYFORMULA(ROW(A:A))

I strongly advise you to use hard coded Id's. If for some reason the sheet gets re-arranged, then the Id's will follow with that re-arrangement. An ARRAYFORMULA will stick to its plan and present the range as ever.