I want to number each row when the data is saved in Google sheets

I want to number each row when the data is saved in Google sheets??
ID is number of the user
ex: user 1: ID = 1 , user 2 : ID= 2 …

this is my project:

blocks:

Google Sheets:

If you want sequentially numbering, then do as follows:

  1. Delete all blank rows in your sheet
  2. Add this formula to B1:
={"ID";arrayFormula(if(A2:A="","",row(A2:A)))}

Send an empty string for your ID value in your app.
.
.
.
If you want to pull a value from your app somewhere, include this in your empty block.

In Multiple ways you can achieve this.

  1. One is generating Auro serial number in ghseet just like @TimAi2 advice
  2. Get gsheet datas, count it and then add +1 then use this number in the &I_D= place…
  3. whenever data added count the col and save it in any cell and at the time of sending data from app just call this cell value alone and just do +1 then use this number in &I_D Place (=ArrayFormula(COUNTA(A2:A))

Thank you for your help.
When I do this, the app does not send data at all.

Thank you for your help.

1 Like

Did you delete all your empty rows as instructed? Scroll to the end of the sheet, I guess you will find data…

Thank you very much
I found the solution
function is : =ROW()-1

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.