ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Cell color (https://www.excelbanter.com/excel-programming/337036-cell-color.html)

Rafael

Cell color
 
HI!

I am having a problem. I want to know whick color is a cell, but when a try
Cells.Interior.ColorIndex it returns the color of the cell without the
"Conditional Formating". I mean, the cell color is yellow, but with the
"Conditional Formating" it becomes gray, but that command returns yellow, not
gray as I wanted.

Please, help me!
Thanks!

Bob Phillips[_6_]

Cell color
 
With CF the usual technique is to test whether a cell meets the CF
condition(s) and then work from there.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Rafael" wrote in message
...
HI!

I am having a problem. I want to know whick color is a cell, but when a

try
Cells.Interior.ColorIndex it returns the color of the cell without the
"Conditional Formating". I mean, the cell color is yellow, but with the
"Conditional Formating" it becomes gray, but that command returns yellow,

not
gray as I wanted.

Please, help me!
Thanks!




David McRitchie

Cell color
 
You really don't want to be checking what color a cell is and then use that
to do something else. You should be using the same formula as the
Conditional Formatting.

You will find code for working with Conditional Formatting at
http://www.mvps.org/dmcritchie/excel/condfmt.htm (Bernie Dietrick subroutine)
http://www.cpearson.com/excel/CFColors.htm (Chip Pearson)
http://www.mcgimpsey.com/excel/conditional6.html (J.E. McGimpsey)
http://www.mvps.org/dmcritchie/excel/xl2html.htm (uses modified C.Pearson code for C.F. cell colors)

---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Rafael" wrote in message ...
HI!

I am having a problem. I want to know whick color is a cell, but when a try
Cells.Interior.ColorIndex it returns the color of the cell without the
"Conditional Formating". I mean, the cell color is yellow, but with the
"Conditional Formating" it becomes gray, but that command returns yellow, not
gray as I wanted.

Please, help me!
Thanks!





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

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