Coloured Cells

G

Guest

Is it possible to use a formula to return a value of True if a cell you refer
to is coloured or not? What I want to do is: If Sheet1 A1 is shaded red,
then I want a cell in Sheet2 to return P for paid, if not stay blank?

Thanx

Becks
 
G

Guest

If you are willing to use a small UDF, then you can test for color. Enter
this UDF:

Function IsRed(r As Range) As Integer
IsRed = 0
If r.Interior.ColorIndex = 3 Then
IsRed = 1
End If
End Function

Then in A1 in Sheet2 enter:

=IF(IsRed(Sheet1!A1)=1,"P","")
 
G

Guest

I have entered the UDF, and it works initially. But if the colour is cleared
or added later the formula doesn't update?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top