0

I have a spread sheet and I am trying to set a backColor for cells with empty values of some particular columns. Presently, I can iterate through the spread sheet and set the backColor for all cells with empty values, but I want to narrow it down to only check particular columns. For instance if I have columns Name, Location, Age, Net worth, Occupation. I want to loop through cells within Age and Occupation columns alone, instead of all.

teestunna
  • 197
  • 4
  • 17

1 Answers1

0

I think a better option than iterating through cells is to apply the formatting to the range. For example getRange("C:C").backColor("red"); would set the background to red for the whole column.

if you only want to set empty values, then conditional formatting would be better.

jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
GrapeCity Team
  • 837
  • 1
  • 5
  • 8