View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gary''s Student
 
Posts: n/a
Default Can you do an IF function whether a cell has a fill color of Rose

Enter this small UDF:

Function clr(R As Range) As Integer
With R.Interior
clr = .ColorIndex
End With
End Function

and use in the worksheet like =clr(A1)
--
Gary''s Student


"Kays Excel Question" wrote:

I want to get a 1 returned when I quere a cell if the fill color is Rose
(colorindex=38). Do you use the IF function or is there another way to do
it? What is the IF function syntax?