Skip to content

Instantly share code, notes, and snippets.

@rhyskentish
Created October 4, 2019 14:51
Show Gist options
  • Save rhyskentish/6d4f1ac376e7f04a1e95884f5b0ab381 to your computer and use it in GitHub Desktop.
Save rhyskentish/6d4f1ac376e7f04a1e95884f5b0ab381 to your computer and use it in GitHub Desktop.
function getColByName(name){
var headers = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Sheet1').getDataRange().getValues()[1];
var colindex = headers.indexOf(name);
return colindex+1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment