Add new row "below" current row

Is there a way to use the action “Add Row” but instead of adding it to the botton of the sheet, it adds it right under my current row.

I have a list of 100 items to purchase. I select item in row 49, input purchased quantity. If quantity < 25, add new row with same info, add new row, just under previous one, at position 50.

I can use Zaps if needed, but havent found anything so far.

1 Like

Add row always adds to the bottom of the sheet.
Couldn’t you just use a sort order to show all rows depending on your criteria?

Thanks for replying Roldy.

It’s mostly for the “supervisor” using Google Sheets. Having it at the bottom is unconvenient for them and adds a manual step. Since we can’t have a mix of Pages and Apps, I decided to use App but my admin work stills needs to be done through Google Sheets. :frowning:

1 Like

I understand. So if this is the specific case, I think that using google sheet you have to find a solution in google sheet.
I would write a function in apps script that puts the rows back in order in another sheet.
I don’t think there is another easier way.

As you said, the API always write to the last row, so it might have to be script here.

  • Find the number of the “current row”.
  • Get all the data that is below the “current row”.
  • Shifts that data one row below so we have an empty row.
  • Write the new data to the empty row.

However, this can become quite a mess if multiple people try to do it at once.

1 Like

Thanks to both of you for the suggestion!

1 Like