ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Another Question (https://www.excelbanter.com/excel-worksheet-functions/132238-another-question.html)

Kris79

Another Question
 
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.


joel

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.




All times are GMT +1. The time now is 04:36 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com