Created
December 4, 2024 06:34
-
-
Save rafamerino/55f5528af077597bcd78c768445ff3bb to your computer and use it in GitHub Desktop.
Clear users custom format in Google Sheets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For a SPECIFIC COLUMN | |
function onEdit(){ | |
if(e.range.columnStart === 8){ // CHANGE THE COLUMN | |
var spreadsheet = SpreadsheetApp.getActive(); | |
var activeRange=spreadsheet.getActiveRange(); | |
activeRange.clearFormat(); | |
} | |
} | |
// ======================================================= | |
// For a FULL RANGE | |
function onEdit(){ | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var sheet = ss.getSheets()[0]; | |
var range = sheet.getRange("A1:D10"); // CHANGE THIS RANGE | |
range.clearFormat(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment