Hi;
Made a function which checks if the cell color is red or yellow and returns the word or returns nothing"". The sheet with the function looks into another workbook with conditional formatting which turns the cell into three/four colors dependent on the cell input. My issue is that the function does not work with cell coloring by conditional formatting. Works fine with regular cell color placement. How can I get it to see the coloring by the conditional formatting.
Code:
Function Checkcolor(range)
If range.Interior.ColorIndex = 3 Then
Checkcolor = "RED"
ElseIf range.Interior.ColorIndex = 6 Then
Checkcolor = "YELLOW"
Else
Checkcolor = "WHAT"
End If
End Function
Regards;
Made a function which checks if the cell color is red or yellow and returns the word or returns nothing"". The sheet with the function looks into another workbook with conditional formatting which turns the cell into three/four colors dependent on the cell input. My issue is that the function does not work with cell coloring by conditional formatting. Works fine with regular cell color placement. How can I get it to see the coloring by the conditional formatting.
Code:
Function Checkcolor(range)
If range.Interior.ColorIndex = 3 Then
Checkcolor = "RED"
ElseIf range.Interior.ColorIndex = 6 Then
Checkcolor = "YELLOW"
Else
Checkcolor = "WHAT"
End If
End Function
Regards;