javascript - google app script copy values !=0 into new column -


i trying copy cells value 0 cell. can't seem if statement work.

function pushgeo()  { var ssa = spreadsheetapp.openbyid('###') var ss = ssa.getsheetbyname('thissheet'); var lastrow = ss.getlastrow();   for(var row=2;row<=lastrow;row++)   {     if(ss.getrange('g'+row).getvalue() != 0){       var source = ss.getrange('g2:g'+lastrow);        var destination = ss.getrange('n2:n'+lastrow);        source.copyto(destination);      }    } 

right it's copying cells new column.

== ah, nevermind. silly range. time stop coding day.

function pushgeo()  {   for(var row=2;row<=lastrow;row++)   {     if(ss.getrange('g'+row).getvalue() != 0){       var source = ss.getrange('g'+row);        var destination = ss.getrange('n'+row);        source.copyto(destination);     }      } 

ah, nevermind. silly range. time stop coding day.

function pushgeo()  {   for(var row=2;row<=lastrow;row++)   {     if(ss.getrange('g'+row).getvalue() != 0){       var source = ss.getrange('g'+row);        var destination = ss.getrange('n'+row);        source.copyto(destination);     }      } 

Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -