RemcoE33

Fill blanks

Jun 21st, 2021 (edited)
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function fillBlanks(){
  2.   const ss = SpreadsheetApp.getActiveSpreadsheet()
  3.   const sheet = ss.getSheetByName('Data')
  4.   const values = sheet.getRange(1,1,sheet.getLastRow()).getValues().flat()
  5.  
  6.   for (let i = 0; i < values.length; i++){
  7.     if(values[i] == ""){
  8.       sheet.getRange(i+1,1).setValue('Test')
  9.     }
  10.   }
  11.  
  12. }
Add Comment
Please, Sign In to add comment