Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Comparing Fill Color
Is there a way for me to determine the current fill color of a cell? For example if the cell is red filled, I do not want to change the color. But if it is any other color, I would would overlay with a color. I'm using VBA to comparing 2 fields values and then color filling another based on the result. The code works fine but I do not want RED fill to be overlaid. -- magoobee ------------------------------------------------------------------------ magoobee's Profile: http://www.excelforum.com/member.php...o&userid=21581 View this thread: http://www.excelforum.com/showthread...hreadid=478811 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Comparing Fill Color
Enter this small UDF:
Function clr(R As Range) As Integer With R.Interior clr = .ColorIndex End With End Function Use it like =clr(A1). It will return a number corresponding to the interior color of A1 -- Gary''s Student "magoobee" wrote: Is there a way for me to determine the current fill color of a cell? For example if the cell is red filled, I do not want to change the color. But if it is any other color, I would would overlay with a color. I'm using VBA to comparing 2 fields values and then color filling another based on the result. The code works fine but I do not want RED fill to be overlaid. -- magoobee ------------------------------------------------------------------------ magoobee's Profile: http://www.excelforum.com/member.php...o&userid=21581 View this thread: http://www.excelforum.com/showthread...hreadid=478811 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
fill color and font color icons do not work in excel | Excel Discussion (Misc queries) | |||
color fill button is not adding color to my spread sheet | Excel Worksheet Functions | |||
My fill color and font color do not work in Excel Std Edition 2003 | Excel Discussion (Misc queries) | |||
Excel 2003 will not display color fonts or color fill cells | Excel Worksheet Functions | |||
My excel 2003 wont let me fill cells with color or color the tabs. | New Users to Excel |