Skip to main content
Best answer

How to add a row on the top with right number?

  • November 10, 2020
  • 4 replies
  • 1488 views

  • Beginner
  • 6 replies

Hello!

I have a question about Google Sheets.

The structure of document is like that:

 

 

I want to:

  1. Add the row at the top of the table by creating a new row (not on the bottom)
  2. Make a number of the row like “the last one + 1” (see the screenshot)

Is it possible and how to make it?

 

Thanks a lot!

Best answer by GetUWiredBest answer by GetUWired

Hi there,

It is possible if you add a search column to your sheet. Technically, those rows you are wanting to create already exists. Zapier has the ability to find a row and to update a row. We just need to tell it what to look for. I’ve outlined a workaround below that will accomplish what you are hoping to do. 

First, you will need to add a column somewhere in your sheet that makes it easy for Zapier to search. The search value will get added every time when creating the new row. To start, you’ll just add it to the top row in your sheet.

Next, you’ll need to make a “Lookup Spreadsheet Row in Google Sheets” Zapier step. In this step, you’ll search for the lookup value on your sheet. The included screenshot is all you have to configure in this step.

 

When this runs, it will return the first match which will be the top row. 

Next, you’ll need to do the math to the returned row value from this step using the “Formatter by Zapier” action. I’ve outlined it below. This subtracts 1 from the returned row above. 

Lastly, you will set up a step to “Update Spreadsheet Row in Google Sheets”. Configure similarly to the next screenshot, using the output from the math operation for the row id, and a formula to auto increment the number,

 

 

Once it runs, it will auto increment like you’re wanting! Happy Zapping!

 

View original
Did this topic help you find an answer to your question?
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

4 replies

AndrewJDavison_Luhhu
Forum|alt.badge.img+10

Hi @Euge 

Sadly, it’s not possible - Zapier can only add a new row to the bottom of an existing Google Sheet. There is no way to override this.


GetUWired
Forum|alt.badge.img+12
  • Zapier Expert
  • 1030 replies
  • Answer
  • November 13, 2020

Hi there,

It is possible if you add a search column to your sheet. Technically, those rows you are wanting to create already exists. Zapier has the ability to find a row and to update a row. We just need to tell it what to look for. I’ve outlined a workaround below that will accomplish what you are hoping to do. 

First, you will need to add a column somewhere in your sheet that makes it easy for Zapier to search. The search value will get added every time when creating the new row. To start, you’ll just add it to the top row in your sheet.

Next, you’ll need to make a “Lookup Spreadsheet Row in Google Sheets” Zapier step. In this step, you’ll search for the lookup value on your sheet. The included screenshot is all you have to configure in this step.

 

When this runs, it will return the first match which will be the top row. 

Next, you’ll need to do the math to the returned row value from this step using the “Formatter by Zapier” action. I’ve outlined it below. This subtracts 1 from the returned row above. 

Lastly, you will set up a step to “Update Spreadsheet Row in Google Sheets”. Configure similarly to the next screenshot, using the output from the math operation for the row id, and a formula to auto increment the number,

 

 

Once it runs, it will auto increment like you’re wanting! Happy Zapping!

 


  • Author
  • Beginner
  • 6 replies
  • November 13, 2020

Thanks for the solution @GetUWired!

It looks like magic)


I will try to repeat this and tell you about the results!;)


GetUWired
Forum|alt.badge.img+12
  • Zapier Expert
  • 1030 replies
  • November 13, 2020

Any time! Glad we could help!