I have created a function to get the text color of a cell when I insert the formula in another cell. My aim is to filter rows by color.
Steps:
1. Create the code:
function getHex(input) {
return SpreadsheetApp.getActiveSpreadsheet().getRange(input).getFontColor();
};
2. Type the function in cell M2, for example:
=getHex("C2:C10")
3. Range M2:M10 will return the font color from C2:C10.
This function worked with .getBackgrounds()
(https://www.techjunkie.com/filter-by-color-google-sheets/), but it is not working with .getFontColor()
. Can someone help me, please?