How to Delete Rows in Google Sheets

Learn how to efficiently delete rows in Google Sheets using various methods, including right-click options, keyboard shortcuts, and Apps Script functions.

Here's how to delete rows. In Google Sheets, you can select any cell or even the entire row , right click and delete row . You can select the whole row , you can delete row , and you can also select multiple rows or multiple cells . And if you right click, it'll say delete rows for through seven. It tells you exactly the rows that are being deleted. Now if I delete one row, I can now select any other row and do command Y or redo, and it's redoing the last thing that I did, which is delete a row, and I can delete any number of rows this way with just command Y without having to right click. There's another way I can select any row and go up to edit, delete. And here I have the option to delete row four.

If I select multiple rows or multiple cells that have cover multiple rows, go to edit, delete, and now it says rows four through nine, I can delete. Same if I select the entire row of four through nine. Edit, delete. And it just says rows four through nine. I could also delete the values if I wanted to, but that wouldn't delete the rows, just the values within those rows. If I have multiple columns selected, the rows are not Deletable. Just so you know, there's another way I can go up to Extensions app script . I can create a function , delete row, and here I can say spreadsheet, app, dot, get active, spreadsheet, get range. I can. Do get active spreadsheet, do delete row, and here I just need a row integer.

So let's say three. What that's going to do is delete the third row. Let's command S and save it. And I'm going to hit run. I will need to authorize the right first time I run this. And now we see that row three was deleted, and I can do this over and over again. I can run this and delete that row. I can even get this as a range . So variable row equals. Spreadsheet app dot get active range dot get row. Now, whichever row I'm on will be this variable row, so I just take three out and put in row save it, and that's put it on row seven, click run, and now row seven was deleted. See there it was. I can undo as well and undo all of those deletes.

This is a cool way to delete row programmatically or in different ways. You are watching better sheets here on YouTube. Make sure you check out this video or this video and subscribe right now to get more tips, tricks, how tos, get more out of your Google sheets than you ever have before. I'm excited to be making a ton more videos here. Ask me questions down in the comments and I will answer them in future videos. But for right now, right here, one of these videos is gonna be your next Google sheet.