V
V
Vladimir Zuev2020-06-14 12:55:02
Google Apps Script
Vladimir Zuev, 2020-06-14 12:55:02

How to correctly color a row in a table in a loop through variables?

Hello. I'm trying to color a string through this code in a loop

lr = sheet1.getLastRow();
  lc = sheet1.getLastColumn();               
  sheet1.getRange(lr, 1, lr, lc).setBackground('#ffff00')

But I do not understand why the range of lines grows with each cycle. How to correctly color only the line that you just filled out? Something with lr I do not understand.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question