From this question:
Set the background color to a cell based on a hex value
I’m looking for a formula that I can write down in a cell then in an adjacent cell appears the HEX color I wrote down. And that color stays there.
They answered with a script that changes everything in the Google sheet. It’s not what I’m looking for because it edits the whole document. And when I delete the HEX code from the cell, the color is deleted too.
I found another answer:
How to change the color of a cell based on rgb data in other cells
The result is what I’m looking for but the code won’t work for me because a) they’re in RGB and 2) they work onEdit and I already have an onEdit function in my Google sheet.
I understand I can use Conditional Formatting, or I can go to the palette and painstainkingly write down each one of the HEX codes.
But what I’ve been looking for is: a very succinct formula that works when I write it down in a very specific cell or specific column or specific row after I copypaste the custom function for that succinct formula in Apps Script, of course.
Just like this one but in reverse, lol
How to get the hexadecimal codes of colors in google sheets
I’m self-learning -how to copypaste- code, I just want things to work out as I want :'((
Thank you for all the help.
(English is my second language, I’m sorry for errors)
Audrey G is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.