lundi 10 octobre 2016

im try to chake if cell is empty (n1) and place messege if empty. if not empty can process with function

// function to tranfer data to another Execl. function transfer() { // mark N1 as cell var cell = SpreadsheetApp.getActive().getRange('N1'); var rule = SpreadsheetApp.newDataValidation().requireDateAfter(new Date('2016/10/09')).build(); cell.setDataValidation(rule);

//if cell (N1) is empty then put messege box if(cell == ""){ Browser.msgBox("need to place a date"); } //else make the function else{ Browser.msgBox("date "); //Cource sheets var sss = SpreadsheetApp.openById('1NcAn2Jvlw_nDsiQEx64HrvsIOPdtoRFj6kAAbluOmOY'); var ss = sss.getSheetByName('tips'); var range = ss.getRange('A35:H35'); var data = range.getValues();

// Destination Sheet var tss = SpreadsheetApp.openById('1ELiI8vmvhAVkEj6qUz6AnzqzZBbNtcY5NSK9dZINr0c');

var ts = tss.getSheetByName('Olga'); ts.getRange(ts.getLastRow()+1, 1,1,8).setValues(data); } }

Aucun commentaire:

Enregistrer un commentaire