Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9843

Changing the fontColor of cells when editing

$
0
0

I'm trying to write an Apps Script that change the font color of a cell when it value changes.

I found a way to to change de fontColor of a range, and add to trigger 'onEdit', but the all range is changing and not the single cells that I've been modify.

Here is my Script :

function changeFontColor() {  var ss = SpreadsheetApp.getActiveSpreadsheet();  var sheetA1 = ss.getSheetByName('Voltaire');  var lastRow = sheetA1.getLastRow();  var lastColumn = sheetA1.getLastColumn();  var dataRange = sheetA1.getRange(3, 3, lastRow -6, lastColumn);  dataRange.setFontColor('Red');} 

Viewing all articles
Browse latest Browse all 9843

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>