I have a Google spreadsheet with hundreds of employee names for a schedule. Each cell has multiple names within that cell that look like this:
First Last
First Last
First Last
First Last
First Last
Many of the names are color coded red while the others remain black. I'm using a script to remove the extra newlines to collapse the names to this (many of them are removed using find/replace for things such as days off, resulting in the blank newline):
First Last
First Last
First Last
First Last
First Last
The problem is, is that when this script is ran the red names have their font changed to black. I can't figure out a way to write a for loop to turn these individual lines within the cell back to red. I either end up with all the text in the cell being red, or HTML code indicating it should be red.
Any ideas on how I could make this work?