Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save MrwanBaghdad/89145adfbe6fc3830698a011090050d7 to your computer and use it in GitHub Desktop.

Select an option

Save MrwanBaghdad/89145adfbe6fc3830698a011090050d7 to your computer and use it in GitHub Desktop.
Sorting doodle form as a spreadsheet by time, Every Name with entry has it's time. Google App script
function myFunction() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheets()[0];
var data= sheet.getRange("A5:P50");
var cell;
var i,j;
Logger.log(data.getWidth());
// for(i=1;i<data.getHeight();i++){
//
// sheet.appendRow([data.getCell(i, 1).getValue()]);
// }
for(var col=1;col<data.getWidth();col++)
{
for(var row=1;row<data.getHeight();row++){
cell= data.getCell(row, col);
if(cell.getValue()=="OK")
sheet.appendRow([data.getCell(row, 1).getValue(), data.getCell(2, col).getValue()]);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment