Best answer

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

  • 10 November 2020
  • 4 replies
  • 1354 views

Userlevel 2

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!

icon

Best answer by GetUWired 13 November 2020, 16:11

View original

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

Userlevel 7
Badge +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.

Userlevel 7
Badge +12

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!

 

Userlevel 2

Thanks for the solution @GetUWired!

It looks like magic)


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

Userlevel 7
Badge +12

Any time! Glad we could help!