Checking a Row for a Background Color
Thank you for these great answers!
I especially liked astef's answer,
Function GetFillColor(Rng As Range) As Long
GetFillColor = Rng.Interior.ColorIndex
End Function
which checks for a cell's background color by writing the above macro (alt+f11 to open macros), and I used that function to easily create a version of this that checks if a range of three cells in the row have a background color of yellow.
Now this might be performant or not, but it's a simple way to write the formula. This is the formula in the status column, which will check the other columns selected for any cells with yellow background, using the GetFillColor macro from astef's answer.
=IF(OR(GetFillColor([@Fees])=6,
GetFillColor([@Interest])=6,
GetFillColor([@Borrowing])=6),
"yellow", "none")
This will return yellow to the cell if there is any yellow background (color index 6), in the cells in the GetFillColor(cell) formulas. Another advantage of writing the GetFillColor() macro is that you can use it to find what color it is you are searching for, by simply selecting an empty cell and writing =GetFillColor(your_cell) where your cell is the cell with the color of which you want the color index number.
To change this to your liking, change the GetFillColor() arguments in the =IF(OR formula above to be the cells in which might be the color, and change the 6 to any color index number you want to find, and change the two "" arguments at the end to any messages you want. The first is printed if the color is found, the second if not. Remember you can use the GetFillColor macro to return the color of any cell you like, in order to know what color index to use in the formulas.
Hope it helps. I'm open to improvement comments.