PC Review


Reply
Thread Tools Rate Thread

Count the number of colored cells in a column

 
 
Dave
Guest
Posts: n/a
 
      27th Feb 2009
I have a column that has conditional formating applied and want to count the
number of cells that are red or green or any color.
 
Reply With Quote
 
 
 
 
Luke M
Guest
Posts: n/a
 
      27th Feb 2009
The only way to count color is with VBA.

Using just formulas:
Why not count the cells based on what your formatted them by? (i.e., since
there's some formula governing what color the cell is, use that formula to
help determine the count!)
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Dave" wrote:

> I have a column that has conditional formating applied and want to count the
> number of cells that are red or green or any color.

 
Reply With Quote
 
Dave
Guest
Posts: n/a
 
      27th Feb 2009
I guess I will have to open that VBA book I just bought. I have mutiple
conditions applied to each cell. The color that will show will trip at a
different level(red>50 or green <25)

Thanks

"Luke M" wrote:

> The only way to count color is with VBA.
>
> Using just formulas:
> Why not count the cells based on what your formatted them by? (i.e., since
> there's some formula governing what color the cell is, use that formula to
> help determine the count!)
> --
> Best Regards,
>
> Luke M
> *Remember to click "yes" if this post helped you!*
>
>
> "Dave" wrote:
>
> > I have a column that has conditional formating applied and want to count the
> > number of cells that are red or green or any color.

 
Reply With Quote
 
Ron@Buy
Guest
Posts: n/a
 
      27th Feb 2009
This link will demonstrate the VBA solution:
www.cpearson.com/excel/colors.htm


"Luke M" wrote:

> The only way to count color is with VBA.
>
> Using just formulas:
> Why not count the cells based on what your formatted them by? (i.e., since
> there's some formula governing what color the cell is, use that formula to
> help determine the count!)
> --
> Best Regards,
>
> Luke M
> *Remember to click "yes" if this post helped you!*
>
>
> "Dave" wrote:
>
> > I have a column that has conditional formating applied and want to count the
> > number of cells that are red or green or any color.

 
Reply With Quote
 
Mike H
Guest
Posts: n/a
 
      27th Feb 2009
> This link will demonstrate the VBA solution:
> www.cpearson.com/excel/colors.htm


No it wont this is for counting colorindex etc, counting CF colours is much
more difficult but have a look here

http://xldynamic.com/source/xld.ColourCounter.html


Mike

"Ron@Buy" wrote:

> This link will demonstrate the VBA solution:
> www.cpearson.com/excel/colors.htm
>
>
> "Luke M" wrote:
>
> > The only way to count color is with VBA.
> >
> > Using just formulas:
> > Why not count the cells based on what your formatted them by? (i.e., since
> > there's some formula governing what color the cell is, use that formula to
> > help determine the count!)
> > --
> > Best Regards,
> >
> > Luke M
> > *Remember to click "yes" if this post helped you!*
> >
> >
> > "Dave" wrote:
> >
> > > I have a column that has conditional formating applied and want to count the
> > > number of cells that are red or green or any color.

 
Reply With Quote
 
T. Valko
Guest
Posts: n/a
 
      28th Feb 2009
VBA is not required.

If the CF is based on a certain cell value then all you have to do is count
how many cell values in the range meet that condition.

>will trip at a different level(red>50 or green <25)


That's a start!

If cells turn red when they contain a value >50 to count those cells:

=COUNTIF(A1:A10,">50")

If cells turn green when they contain a value <25 to count those cells:

=COUNTIF(A1:A10,"<25")


--
Biff
Microsoft Excel MVP


"Dave" wrote:

> I guess I will have to open that VBA book I just bought. I have mutiple
> conditions applied to each cell. The color that will show will trip at a
> different level(red>50 or green <25)
>
> Thanks
>
> "Luke M" wrote:
>
> > The only way to count color is with VBA.
> >
> > Using just formulas:
> > Why not count the cells based on what your formatted them by? (i.e., since
> > there's some formula governing what color the cell is, use that formula to
> > help determine the count!)
> > --
> > Best Regards,
> >
> > Luke M
> > *Remember to click "yes" if this post helped you!*
> >
> >
> > "Dave" wrote:
> >
> > > I have a column that has conditional formating applied and want to count the
> > > number of cells that are red or green or any color.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Count cells in column that contain number in a range Glenn Microsoft Excel Worksheet Functions 0 10th Dec 2008 05:18 PM
Count number of cells and total in one column, based on another column suffix Pierre Microsoft Excel Worksheet Functions 5 31st Oct 2007 12:28 AM
how to count number of highlighted cells in column =?Utf-8?B?TWlrZSBL?= Microsoft Excel Misc 5 9th May 2007 08:41 PM
Is there a way to count the number of different colored cells? =?Utf-8?B?TUNN?= Microsoft Excel Worksheet Functions 1 21st Nov 2006 06:16 PM
Can you count the number of cells that are highlighted in a column =?Utf-8?B?TWlrZQ==?= Microsoft Excel Worksheet Functions 1 13th Oct 2006 07:59 PM


Features
 

Advertising
 

Newsgroups
 


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