Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Counting Conditional Format colors

In the interest of full disclosure I know absolutly nothing about VB.

I'm using the code from: http://www.xldynamic.com/source/xld.CFConditions.html

I'm using 3 conditions:

1) Cell Value = .99 shades cell green
2) Cell Value Between .99 and .9 shades cell yellow
3) Cell Value <= .9 shades cell red

Now, the problem that I'm having is that I can't get the yellow shaded
cells counted using the supplied code from that site. I've tried
taking it one step at a time and have come to find out that according
to the IsCFMet1 function from that site reports FALSE if a condition
is met on only the cells shaded in yellow. That leads me to belive
that there's something wrong with my second condition that's set up,
but what that may be I have no idea. Any ideas/suggestions?

Thanks in advance,
Destrachan
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Counting Conditional Format colors

On Apr 25, 1:44*pm, wrote:
In the interest of full disclosure I know absolutly nothing about VB.

I'm using the code from:http://www.xldynamic.com/source/xld.CFConditions.html

I'm using 3 conditions:

1) Cell Value = .99 shades cell green
2) Cell Value Between .99 and .9 shades cell yellow
3) Cell Value <= .9 shades cell red

Now, the problem that I'm having is that I can't get the yellow shaded
cells counted using the supplied code from that site. *I've tried
taking it one step at a time and have come to find out that according
to the IsCFMet1 function from that site reports FALSE if a condition
is met on only the cells shaded in yellow. *That leads me to belive
that there's something wrong with my second condition that's set up,
but what that may be I have no idea. *Any ideas/suggestions?

Thanks in advance,
Destrachan


Nevermind, I decided to "inspect" the VB code as best I could and
through the power of deductive reasoning found that in the IsCFMet1
code there's a mix up with the = & <= in regards to the between
argument. All's well now :)
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Counting Conditional Format colors

Can you clarify that please, I am not aware of it?

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



wrote in message
...
On Apr 25, 1:44 pm, wrote:
In the interest of full disclosure I know absolutly nothing about VB.

I'm using the code
from:http://www.xldynamic.com/source/xld.CFConditions.html

I'm using 3 conditions:

1) Cell Value = .99 shades cell green
2) Cell Value Between .99 and .9 shades cell yellow
3) Cell Value <= .9 shades cell red

Now, the problem that I'm having is that I can't get the yellow shaded
cells counted using the supplied code from that site. I've tried
taking it one step at a time and have come to find out that according
to the IsCFMet1 function from that site reports FALSE if a condition
is met on only the cells shaded in yellow. That leads me to belive
that there's something wrong with my second condition that's set up,
but what that may be I have no idea. Any ideas/suggestions?

Thanks in advance,
Destrachan


Nevermind, I decided to "inspect" the VB code as best I could and
through the power of deductive reasoning found that in the IsCFMet1
code there's a mix up with the = & <= in regards to the between
argument. All's well now :)


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Counting Conditional Format colors

Case xlBetween
IsCFMet1 = (rng.Value = oFC.Formula1 And _
rng.Value <= oFC.Formula2)

is what I'm referring to. But upon further review, it's really a "no
fault" error.
My second conditon looks like this: Cell Value Between .99 and .9
shades cell yellow.

So, I just had to change the order of the = & <= from the way that
your originally wrote it. Of course I could have changed my condition
to read: Cell Value Between .9 and .99 shades cell yellow, instead but
I didn't really think about that at the time. I want to thank you
Bob, the code that you put up is wonderful and once I finally got my
brain wrapped about it a bit, it worked like a charm. :)

On Apr 25, 2:34*pm, "Bob Phillips" wrote:
Can you clarify that please, I am not aware of it?

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

wrote in message

...
On Apr 25, 1:44 pm, wrote:





In the interest of full disclosure I know absolutly nothing about VB.


I'm using the code
from:http://www.xldynamic.com/source/xld.CFConditions.html


I'm using 3 conditions:


1) Cell Value = .99 shades cell green
2) Cell Value Between .99 and .9 shades cell yellow
3) Cell Value <= .9 shades cell red


Now, the problem that I'm having is that I can't get the yellow shaded
cells counted using the supplied code from that site. I've tried
taking it one step at a time and have come to find out that according
to the IsCFMet1 function from that site reports FALSE if a condition
is met on only the cells shaded in yellow. That leads me to belive
that there's something wrong with my second condition that's set up,
but what that may be I have no idea. Any ideas/suggestions?


Thanks in advance,
Destrachan


Nevermind, I decided to "inspect" the VB code as best I could and
through the power of deductive reasoning found that in the IsCFMet1
code there's a mix up with the = & <= in regards to the between
argument. *All's well now :)- Hide quoted text -

- Show quoted text -


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Counting Conditional Format colors

Thanks for clarifying that. I will check out the code and see if I can make
work regardless of how the conditions are setup.

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



wrote in message
...
Case xlBetween
IsCFMet1 = (rng.Value = oFC.Formula1 And _
rng.Value <= oFC.Formula2)

is what I'm referring to. But upon further review, it's really a "no
fault" error.
My second conditon looks like this: Cell Value Between .99 and .9
shades cell yellow.

So, I just had to change the order of the = & <= from the way that
your originally wrote it. Of course I could have changed my condition
to read: Cell Value Between .9 and .99 shades cell yellow, instead but
I didn't really think about that at the time. I want to thank you
Bob, the code that you put up is wonderful and once I finally got my
brain wrapped about it a bit, it worked like a charm. :)

On Apr 25, 2:34 pm, "Bob Phillips" wrote:
Can you clarify that please, I am not aware of it?

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)

wrote in message

...
On Apr 25, 1:44 pm, wrote:





In the interest of full disclosure I know absolutly nothing about VB.


I'm using the code
from:http://www.xldynamic.com/source/xld.CFConditions.html


I'm using 3 conditions:


1) Cell Value = .99 shades cell green
2) Cell Value Between .99 and .9 shades cell yellow
3) Cell Value <= .9 shades cell red


Now, the problem that I'm having is that I can't get the yellow shaded
cells counted using the supplied code from that site. I've tried
taking it one step at a time and have come to find out that according
to the IsCFMet1 function from that site reports FALSE if a condition
is met on only the cells shaded in yellow. That leads me to belive
that there's something wrong with my second condition that's set up,
but what that may be I have no idea. Any ideas/suggestions?


Thanks in advance,
Destrachan


Nevermind, I decided to "inspect" the VB code as best I could and
through the power of deductive reasoning found that in the IsCFMet1
code there's a mix up with the = & <= in regards to the between
argument. All's well now :)- Hide quoted text -

- Show quoted text -



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
Counting Colors of Cells set by Conditional Formatting RobFJ[_3_] Excel Worksheet Functions 2 February 16th 10 01:01 PM
How to conditional format in 3 colors in 2007 TES Excel Discussion (Misc queries) 1 May 8th 09 08:57 PM
Copy conditional format colors to another cell davegb[_2_] Excel Programming 2 March 26th 08 06:08 PM
colors and conditional format - greater than, less than Michele Excel Discussion (Misc queries) 5 October 1st 07 10:38 PM
Cell colors on conditional format tankerman Excel Discussion (Misc queries) 6 March 2nd 07 06:31 PM


All times are GMT +1. The time now is 01:06 AM.

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

About Us

"It's about Microsoft Excel"