← All Apps Scripts templates
/
Clean Google Search Console export

Clean Google Search Console export

  1. Create a new Google Sheets file
  2. Go to Extensions → Apps Script
  3. Remove all the code and copy-paste the following instead
  4. Save your project and go back to your sheet
  5. 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);
}
};

Reach us if the process is unclear or if the script is outdated
Apps Scripts template
Free
SEO
Clean Google Search Console export

Clean Google Search Console export

Last updated
3/4/2023
Built by
Avatar Placeholder
internal

Easily clean your Google Search Console data from importing to Google Sheets with Apps Script.