IDENTIFY if Color EXists in Range

Not related to a specific OLAP tool. (Includes forum policies and rules).
Post Reply
bunchukokoy
Regular Participant
Posts: 197
Joined: Thu Dec 03, 2009 8:47 am
OLAP Product: IBM Cognos TM1
Version: 10.2.2.x
Excel Version: 2010
Location: Singapore

IDENTIFY if Color EXists in Range

Post by bunchukokoy »

Hi! Guys,

I'm not sure if this is the right page where I can ask this. But I'm just wondering how can will know if a color, perhaps 'blue' is filled on a cell in MS Excel. I'm using 2003.

Here's the thing, I put a conditional formatting on a range, it's intention is to fill color 'blue' on two or more same-value (duplicate values) cells. But, when I retrieve the color of a cell on that range, it always returns blue even though there are no duplicate values at all on that raNge. Is it because of the conditional formatting that I put? If that so, how will I know if there is indeed a cell colored by blue?
Thanks in Advance!

:D :D :D

bunchukokoy

MOD EDIT: moved to the general forum as its not Cognos related.
bunchukokoy
Regular Participant
Posts: 197
Joined: Thu Dec 03, 2009 8:47 am
OLAP Product: IBM Cognos TM1
Version: 10.2.2.x
Excel Version: 2010
Location: Singapore

Re: IDENTIFY if Color EXists in Range

Post by bunchukokoy »

I'm Sorry guys. :)
User avatar
Alan Kirk
Site Admin
Posts: 6606
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: IDENTIFY if Color EXists in Range

Post by Alan Kirk »

bunchukokoy wrote: I'm not sure if this is the right page where I can ask this. But I'm just wondering how can will know if a color, perhaps 'blue' is filled on a cell in MS Excel. I'm using 2003.

Here's the thing, I put a conditional formatting on a range, it's intention is to fill color 'blue' on two or more same-value (duplicate values) cells. But, when I retrieve the color of a cell on that range, it always returns blue even though there are no duplicate values at all on that raNge. Is it because of the conditional formatting that I put? If that so, how will I know if there is indeed a cell colored by blue?
You look at the cell. If it's emitting light with a wavelength of around 475 nanometres, it's blue.

Seriously, you need to be a bit more specific about what you're doing here. Presumably you're doing this in VBA? What properties are you using to do this, Interior.ColorIndex? Interior.Color? If so, conditional formatting will change neither of these; it's separate to the standard format of a cell.

in my opinion rather than testing whether the cell is showing as a particular colour (since the properties can be misleading on that point if conditional formatting is involved) you'd be far better off replicating the conditional formatting test in the VBA code to determine whether the contents of the cell represents a duplication.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
Post Reply