View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Another Question

Use this function

Function GetBackgroundColor(Mycell As Range) As Integer
'
' GetBackgroundColo Macro
' Macro recorded 2/24/2007 by Joel
'

'
GetBackgroundColor = Mycell.Interior.ColorIndex
End Function



"Kris79" wrote:

Is it possible to write an if function on a background color. Say if
a1 has a background color of red return 1 if true and return 0 if
false.