Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Count the number of times a cell is colored with conditional formatting


I have been trying to figure out how to count the number of times a cel
is colored using conditional formatting.

I have looked through the old threads and still cannot find
solution.

I need to add up the # of times a cell is a certain color (Green) in
particular row.

However, the criteria for the cell to become green is different fro
row to row. In most of the rows, there is only one condition whic
highlights the cell green; it is left blank if it doesn't satisfy thi
condition. In others, there are two conditions: one that highlight
green and one that highlights red. I need to add up the number o
green and red in the row.

I have done searches on this topic before and was pointed to a websit
which tries to explain a VBA code for this.

However, I cannot make heads or tails of this.

If anyone could help, I would greatly appreciate any suggestions.

Thanks.

DrSues0

--
DrSues0
-----------------------------------------------------------------------
DrSues02's Profile: http://www.excelforum.com/member.php...fo&userid=1256
View this thread: http://www.excelforum.com/showthread.php?threadid=27070

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 863
Default Count the number of times a cell is colored with conditional formatting

If it is colored by conditional formatting, the only way to count them is to
use a formula with the same logic that you used to set the color.


On Tue, 19 Oct 2004 21:56:07 -0500, DrSues02
wrote:


I have been trying to figure out how to count the number of times a cell
is colored using conditional formatting.

I have looked through the old threads and still cannot find a
solution.

I need to add up the # of times a cell is a certain color (Green) in a
particular row.

However, the criteria for the cell to become green is different from
row to row. In most of the rows, there is only one condition which
highlights the cell green; it is left blank if it doesn't satisfy this
condition. In others, there are two conditions: one that highlights
green and one that highlights red. I need to add up the number of
green and red in the row.

I have done searches on this topic before and was pointed to a website
which tries to explain a VBA code for this.

However, I cannot make heads or tails of this.

If anyone could help, I would greatly appreciate any suggestions.

Thanks.

DrSues02


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Count the number of times a cell is colored with conditional formatting

Your best bet would be to use ...Interior.ColorIndex

For example 4 and 10 are two basic shades of green. You just have to
make a loop that goes through every cell and looks for the
color/colors youre after.


DrSues02 wrote in message ...
I have been trying to figure out how to count the number of times a cell
is colored using conditional formatting.

I have looked through the old threads and still cannot find a
solution.

I need to add up the # of times a cell is a certain color (Green) in a
particular row.

However, the criteria for the cell to become green is different from
row to row. In most of the rows, there is only one condition which
highlights the cell green; it is left blank if it doesn't satisfy this
condition. In others, there are two conditions: one that highlights
green and one that highlights red. I need to add up the number of
green and red in the row.

I have done searches on this topic before and was pointed to a website
which tries to explain a VBA code for this.

However, I cannot make heads or tails of this.

If anyone could help, I would greatly appreciate any suggestions.

Thanks.

DrSues02

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Count the number of times a cell is colored with conditional formatting

forgot something...

If Youre looking for green cells (conditional formatting) which dont
have a interior.colorindex of green then You cant use what I just
posted.

You can put the same functionality that the conditional formatting
does into your code and looking the other way if that particular Cell
is green to your macro or not. Like if the conditional formatting
triggers on even numbers You just check in the code whether the cell
in question is even (green) or not. And then add it to the totals
combined with the "really green" cells :)

Cheers,
LM


DrSues02 wrote in message ...
I have been trying to figure out how to count the number of times a cell
is colored using conditional formatting.

I have looked through the old threads and still cannot find a
solution.

I need to add up the # of times a cell is a certain color (Green) in a
particular row.

However, the criteria for the cell to become green is different from
row to row. In most of the rows, there is only one condition which
highlights the cell green; it is left blank if it doesn't satisfy this
condition. In others, there are two conditions: one that highlights
green and one that highlights red. I need to add up the number of
green and red in the row.

I have done searches on this topic before and was pointed to a website
which tries to explain a VBA code for this.

However, I cannot make heads or tails of this.

If anyone could help, I would greatly appreciate any suggestions.

Thanks.

DrSues02

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
Count the number of times a cell in a column is shaded green Jack_Feeman Excel Discussion (Misc queries) 6 July 19th 07 09:42 PM
Is there a way to count the number of different colored cells? MCM Excel Worksheet Functions 1 November 21st 06 06:16 PM
Count the number of times a cell value is within a specific range Everett Excel Worksheet Functions 4 September 2nd 06 10:54 PM
How do I count the number of times a letter is used in a cell? jsrawlings Excel Discussion (Misc queries) 5 June 28th 06 02:02 AM
Count number of times a specific number is displayed in a cell ran subs Excel Worksheet Functions 1 June 27th 05 05:01 PM


All times are GMT +1. The time now is 10:50 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"