![]() |
Sensing actual format background color
I have a cell with a conditional format that changes the background color as a function of a dynamic variable ( and < tests)
I'm trying to write a macro that branches based on the "actual" color of the cell - which is determined by whether the conditional format has been "keyed" or not I've learned that Selection.Intererior.ColorIndex an Selection.FormatConditions(1/2/3).Interior.ColorInde return the baseline and conditionally assigned color values but they don't tell me which color index value is in effect for the selected cell at the time Is there a command that can return the color index that is in effect (either baseline or condition1/2/3) Thank |
Sensing actual format background color
Do you mean something like this:
Debug.Print [A1].Interior.ColorIndex -----Original Message----- I have a cell with a conditional format that changes the background color as a function of a dynamic variable ( and < tests). I'm trying to write a macro that branches based on the "actual" color of the cell - which is determined by whether the conditional format has been "keyed" or not. I've learned that Selection.Intererior.ColorIndex and Selection.FormatConditions(1/2/3).Interior.ColorIndex return the baseline and conditionally assigned color values but they don't tell me which color index value is in effect for the selected cell at the time. Is there a command that can return the color index that is in effect (either baseline or condition1/2/3)? Thanks . |
Sensing actual format background color
Ron
Chip Pearson has info and code for determining CF colors. http://www.cpearson.com/excel/CFColors.htm Gord Dibben Excel MVP On Thu, 29 Apr 2004 16:06:03 -0700, Ron wrote: I have a cell with a conditional format that changes the background color as a function of a dynamic variable ( and < tests). I'm trying to write a macro that branches based on the "actual" color of the cell - which is determined by whether the conditional format has been "keyed" or not. I've learned that Selection.Intererior.ColorIndex and Selection.FormatConditions(1/2/3).Interior.ColorIndex return the baseline and conditionally assigned color values but they don't tell me which color index value is in effect for the selected cell at the time. Is there a command that can return the color index that is in effect (either baseline or condition1/2/3)? Thanks |
Sensing actual format background color
Thanks Guys. There are some really intelligent folks on this board! Wish I
were one of them. Ron |
All times are GMT +1. The time now is 03:51 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com