
I've seen very large formulas, but this one seems to hit the top ten
Perhaps post a small sample of your sheet with what you have and expected results.
We can start from there to simplify this monster formula and maybe find a solution to your color problem