ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   ColorIndex (https://www.excelbanter.com/excel-programming/290598-re-colorindex.html)

K Bro

ColorIndex
 

That is exactly my problem when I try to return the colorIndex property
after a cell has been conditionally formated I get a number like -4147.
During my research of this I discovered that number is from the table of
xlConstants. I might try that just for kicks. The color it is set to
after CF is stored somewhere.

Your recomended solution is right on, that would work, but now I have a
quest.




*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Bob Phillips[_6_]

ColorIndex
 
-4147? Do you mean -4142, which is xlColorindexNone, the cell default. All
cells start with this value so you might fail with what you try.

One day I am going to try and write a utility to test a CF colorindex, but
don't hold your breath.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"K Bro" wrote in message
...

That is exactly my problem when I try to return the colorIndex property
after a cell has been conditionally formated I get a number like -4147.
During my research of this I discovered that number is from the table of
xlConstants. I might try that just for kicks. The color it is set to
after CF is stored somewhere.

Your recomended solution is right on, that would work, but now I have a
quest.




*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!




Tom Ogilvy

ColorIndex
 
Or you could look at Chip Pearson's routine (he has already done it):

http://www.cpearson.com/excel/CFColors.htm
Conditional Formatting Colors

--
Regards,
Tom Ogilvy



Bob Phillips wrote in message
...
-4147? Do you mean -4142, which is xlColorindexNone, the cell default. All
cells start with this value so you might fail with what you try.

One day I am going to try and write a utility to test a CF colorindex, but
don't hold your breath.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"K Bro" wrote in message
...

That is exactly my problem when I try to return the colorIndex property
after a cell has been conditionally formated I get a number like -4147.
During my research of this I discovered that number is from the table of
xlConstants. I might try that just for kicks. The color it is set to
after CF is stored somewhere.

Your recomended solution is right on, that would work, but now I have a
quest.




*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!







All times are GMT +1. The time now is 04:52 PM.

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