#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default 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!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 903
Default 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!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't format cell color/text color in Office Excel 2003 in fil Tony S Excel Discussion (Misc queries) 1 December 21st 07 01:41 PM
Excel: Syntax to change cell color based on color of another cell davew18 Excel Worksheet Functions 1 January 4th 07 01:24 PM
Can't format cell color/text color in Office Excel 2003 in files . albertaman Excel Discussion (Misc queries) 0 February 16th 06 03:56 AM
How to change the default Border, Font Color, and Cell Color Elijah Excel Discussion (Misc queries) 3 November 2nd 05 11:52 PM
Browse Forms Controls and change TextBox color based on cell color StefanW Excel Programming 2 November 21st 04 07:06 PM


All times are GMT +1. The time now is 02:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"