How to delete blank rows in Google Sheets

You can set the sheet name in the script as a global variable.

1 Like

Thank you so much Heru and @Greg_L. This is exactly what I needed. I just tested it on several different sheets and it works perfectly. Now, I just have to be brave enough to put it on my production sheet with real data.

Much appreciated.

1 Like

@LeventK I am be very interested in using your proposed script to delete the empty rows. Unfortunately, I have no idea how to modify it to delete the rows as you suggest.

When running the script as it is, I get a ‘server error’ with no other information as to what is wrong.