Last active
August 29, 2015 13:57
-
-
Save rickcnagy/9695686 to your computer and use it in GitHub Desktop.
Proper Case all values in a colum
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
// 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