- Create a new Google Sheets file
- Go to Extensions → Apps Script
- Remove all the code and copy-paste the following instead
- Save your project and go back to your sheet
- All you'll need to change is "Sheet1" to the name of your sheet, "A:A" to your target column, and "value" to the value that you're looking to delete.
The code to paste in Apps Script inside Google Sheets:
function deleteRows() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var s = ss.getSheetByName('Sheet1');
var r = s.getRange('A:A');
var v = r.getValues();
for(var i=v.length-1;i>=1;i--)
if(v[i][0].includes("value")) {
console.log('deleted row ' + v[i][0]);
s.deleteRow(i+1);
}
};