Skip to content

Instantly share code, notes, and snippets.

@rickcnagy
Last active August 29, 2015 13:57
Show Gist options
  • Save rickcnagy/9695686 to your computer and use it in GitHub Desktop.
Save rickcnagy/9695686 to your computer and use it in GitHub Desktop.
Proper Case all values in a colum
// Google Apps Script
// relies on titleCaps(): http://ejohn.org/blog/title-capitalization-in-javascript/
function titleCaseColumn() {
var columnNum = 5;
ss = SpreadsheetApp.getActiveSheet();
for(var i = 2; i < ss.getLastRow(); i++) {
var proper = titleCaps(ss.getRange(i, columnNum).getValue().toLowerCase());
ss.getRange(i, columnNum).setValue(proper);
}
SpreadsheetApp.flush();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment