I would like to know how to change the value of the cell depending on the font color of the other cell. In three adjacent columns (a,b,c) I have three different values, on one of the cells I have a value with green font.
I would like to make a condition that depending on which cell contains text/values with green font I can select the column where this text is located:
I've tried to crate a function to find the color of the font then tried to use this function in a if statement but it doesn't work. This is the function
Function IsColor(lColor As Long, cl As Range) As Boolean
If cl.Font.ColorIndex = lColor Then
IsColor = True
Else
IsColor = False
End If
End Function
Can someone enlighten me on how I should go about this?
CodePudding user response: