Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

Google Sheets clearing every other cell with a script

$
0
0

I have a sheet that have formulas on column B at every other Row starting from B3, so it's B3, B5 and up to B101, I have the following script to clear the rest of the sheet except for column B, How can I add to the function to clear every other row from B3 to B101?

function ClearCells() { var sheet = SpreadsheetApp.getActive().getSheetByName('sheetName'); sheet.getRange('C3:T102').clearContent(); sheet.getRange('A3:A102').clearContent(); }

Viewing all articles
Browse latest Browse all 9782

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>