# Create a new row in Google Sheet and add 1 to a cell from the previous row's value in cell

• 4 replies
• 2771 views

Userlevel 1
• Beginner
• 7 replies

Hey guys,

I’m hoping to get help from people more experienced than me.

What I’m trying to achieve with my Zap in a simplified step by step:

1. Someone submits a Google Form

2. Add data from the form to a new row in the Sheet

3. Update the request number +1 to the previous request number

I don’t know how to get the request number from the already existing last row at the moment of creating a new row. I can’t look up the spreadsheet because I don’t have any value that I can input because none of them are known in advance.

 Request # Date of request Full name Email Sample column 1 6/30/2021 18:46:38 Sample Name sample@email.com 2 6/30/2021 22:25:28 Sample Name 2 sample@email.com 3 6/30/2021 22:32:48 Sample Name 3 sample@email.com

The number in Column 1 would need to go +1 every time a new row is created. Should I use a formula for that? I’m not familiar with them though.

Sorry if there is an answer for this already but I really tried to look for it and wasn’t able to.

icon

Best answer by GetUWired 12 July 2021, 15:49

View original

### 4 replies

Userlevel 1

@LukaBazooka

I did some more digging and did find a formula for you to use! You can use the Index() formula to reference columns by location. So if Request # is in Column A you could use the following formula in your zap.
=Index(A:A,Row()-1,1)+1

This is it! Thank you very much 🙏✌👍

Userlevel 7
+12

Hi @LukaBazooka

Assuming the request # will always be 1 less than the newly created row. When you create the row you could put in the formula =Row()-1 which would give the value of the row created minus 1

if the above won’t work, you could add a column to act as a look up column that always has a static value in it once a row is created. Then you can look up the last row. There are a few discussions on this:

​​​​​​

Userlevel 7
+12

@LukaBazooka

I did some more digging and did find a formula for you to use! You can use the Index() formula to reference columns by location. So if Request # is in Column A you could use the following formula in your zap.
=Index(A:A,Row()-1,1)+1

Userlevel 1

Thanks @GetUWired !

Both of them suggestions were my fallback solutions if nothing else would work or there wouldn’t be other solutions.