Search
 
SCRIPT & CODE EXAMPLE
 

TYPESCRIPT

google sheets loops with if statement

function Loop3(){
  let ss= SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Order')
  let EndRow= ss.getLastRow()
  Logger.log(EndRow)

  for(i=2;i<EndRow;i++){
   let cost= ss.getRange(i,4).getValue()
   let ship1= 10;
   let ship2= 5

   if(ss.getRange(i,1).getValue()=="Branch 2"){
     ss.getRange(i,5).setValue(ship1);
     ss.getRange(i,6).setValue(ship1+cost)
   } else {
     ss.getRange(i,5).setValue(ship2);
     ss.getRange(i,6).setValue(ship2+cost)
   }
  }
}
Comment

PREVIOUS NEXT
Code Example
Typescript :: rest parameters in typescript 
Typescript :: read/write linked lists to file 
Typescript :: regex exec returns null 
Typescript :: typescript string 
Typescript :: writing multiple functional components in single file in react 
Typescript :: pass command line arguments with spaces cmd 
Typescript :: typescript object literals 
Typescript :: typescript array of empty objects 
Typescript :: symbol typescript 
Typescript :: python remove accents pandas 
Typescript :: typescript class example 
Typescript :: is missing in props validation typescript 
Typescript :: json in typescript 
Typescript :: find elements by xpath with matching text 
Typescript :: check null typescript 
Typescript :: gatsby typescript starter hello world 
Typescript :: typescript doesnt read .d.ts 
Typescript :: derivative dots overleaf 
Typescript :: terminal update file metadata 
Typescript :: formatting to six digits in python 
Typescript :: elastice search requirements in ubunt 
Typescript :: how to convert an array of other types in java 8 
Typescript :: the derived ungapped alignments are calleed 
Typescript :: how can you run your test in different environments 
Typescript :: display only user contributor comments wordpress 
Typescript :: how to create total possible sub sets of a list python 
Typescript :: set timer for 30 seconds for otp in typescript 
Typescript :: async function in constructor class typescript 
Typescript :: gravitate a particle to another 
Typescript :: not equal in racket 
ADD CONTENT
Topic
Content
Source link
Name
5+4 =