Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default Counting of cells with a specific color filled

Hello experts,

I have an excel workhseet where different cells are filled with different
colors. I need to count no of cells in a specific column with a specific
colour filled. For example i need to count how many cells are filled with
green color and how many with red etc. What formula i should use?

Thanks in advance,
Atiq

  #2   Report Post  
Posted to microsoft.public.excel.misc
dlw dlw is offline
external usenet poster
 
Posts: 510
Default Counting of cells with a specific color filled

use the COUNTIF() function, the criteria is whatever was used in conditional
formatting to change the color fill of the cell. If conditional formatting
was not used to color the cell, you can't do it. (unless you use Visual
Basic programming)

"Atiq" wrote:

Hello experts,

I have an excel workhseet where different cells are filled with different
colors. I need to count no of cells in a specific column with a specific
colour filled. For example i need to count how many cells are filled with
green color and how many with red etc. What formula i should use?

Thanks in advance,
Atiq

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default Counting of cells with a specific color filled

Cells are filled manually with a specific color, not with COUNTIF() function.
Do i need to learn VB to perform this calculation?

"dlw" wrote:

use the COUNTIF() function, the criteria is whatever was used in conditional
formatting to change the color fill of the cell. If conditional formatting
was not used to color the cell, you can't do it. (unless you use Visual
Basic programming)

"Atiq" wrote:

Hello experts,

I have an excel workhseet where different cells are filled with different
colors. I need to count no of cells in a specific column with a specific
colour filled. For example i need to count how many cells are filled with
green color and how many with red etc. What formula i should use?

Thanks in advance,
Atiq

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Counting of cells with a specific color filled

There is no built-in excel function to do this. But you can use a UDF that
looks at the range and returns the sum of color. But that function will not
recalculate if you change color. Every time you change the color you will
need to recalculate or wait excel to recalculate...

To install the UDF (User Defined function). From workbook launch VBE using
Alt+F11. From menu Insert a Module and paste the below function.Close and get
back to workbook and try the below formula.

Function COLORCOUNT(varRange As Range, varColor As Range)
Dim cell As Range
For Each cell In varRange
If cell.Interior.ColorIndex = varColor.Interior.ColorIndex Then
ColorCount = ColorCount + 1
End If
Next
End Function

ITo use the as a formula in range A1:A10 try the below; which will count the
number of blue cells....The second argument denotes the colored cell.

=COLORCOUNT(A1:A10,B1)

--
Jacob


"Atiq" wrote:

Hello experts,

I have an excel workhseet where different cells are filled with different
colors. I need to count no of cells in a specific column with a specific
colour filled. For example i need to count how many cells are filled with
green color and how many with red etc. What formula i should use?

Thanks in advance,
Atiq

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 834
Default Counting of cells with a specific color filled

See http://www.xldynamic.com/source/xld.ColourCounter.html for a working
example

--

HTH

Bob

"Atiq" wrote in message
...
Hello experts,

I have an excel workhseet where different cells are filled with different
colors. I need to count no of cells in a specific column with a specific
colour filled. For example i need to count how many cells are filled with
green color and how many with red etc. What formula i should use?

Thanks in advance,
Atiq





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default Counting of cells with a specific color filled

Thanks Jacob.
I tried it but is giving error in formula when i apply it. Can you re-check
or may be i am making some mistake in its application...

"Jacob Skaria" wrote:

There is no built-in excel function to do this. But you can use a UDF that
looks at the range and returns the sum of color. But that function will not
recalculate if you change color. Every time you change the color you will
need to recalculate or wait excel to recalculate...

To install the UDF (User Defined function). From workbook launch VBE using
Alt+F11. From menu Insert a Module and paste the below function.Close and get
back to workbook and try the below formula.

Function COLORCOUNT(varRange As Range, varColor As Range)
Dim cell As Range
For Each cell In varRange
If cell.Interior.ColorIndex = varColor.Interior.ColorIndex Then
ColorCount = ColorCount + 1
End If
Next
End Function

ITo use the as a formula in range A1:A10 try the below; which will count the
number of blue cells....The second argument denotes the colored cell.

=COLORCOUNT(A1:A10,B1)

--
Jacob


"Atiq" wrote:

Hello experts,

I have an excel workhseet where different cells are filled with different
colors. I need to count no of cells in a specific column with a specific
colour filled. For example i need to count how many cells are filled with
green color and how many with red etc. What formula i should use?

Thanks in advance,
Atiq

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Counting of cells with a specific color filled

But that function will not recalculate if you change color.
Every time you change the color you will need to
recalculate or wait excel to recalculate...


Which is why you should not base calculations on cell formats!

--
Biff
Microsoft Excel MVP


"Jacob Skaria" wrote in message
...
There is no built-in excel function to do this. But you can use a UDF that
looks at the range and returns the sum of color. But that function will
not
recalculate if you change color. Every time you change the color you will
need to recalculate or wait excel to recalculate...

To install the UDF (User Defined function). From workbook launch VBE using
Alt+F11. From menu Insert a Module and paste the below function.Close and
get
back to workbook and try the below formula.

Function COLORCOUNT(varRange As Range, varColor As Range)
Dim cell As Range
For Each cell In varRange
If cell.Interior.ColorIndex = varColor.Interior.ColorIndex Then
ColorCount = ColorCount + 1
End If
Next
End Function

ITo use the as a formula in range A1:A10 try the below; which will count
the
number of blue cells....The second argument denotes the colored cell.

=COLORCOUNT(A1:A10,B1)

--
Jacob


"Atiq" wrote:

Hello experts,

I have an excel workhseet where different cells are filled with different
colors. I need to count no of cells in a specific column with a specific
colour filled. For example i need to count how many cells are filled with
green color and how many with red etc. What formula i should use?

Thanks in advance,
Atiq



  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default Counting of cells with a specific color filled

Thanks Bob.
I went through this link and followed instructions. Now forumal is giving no
errors but result of formula is 0 though there are 20 cells in that specified
range (A1:A100) filled with Red color.

Can you please advise whether i am making any mistake?

Thanks in advance, Atiq

"Bob Phillips" wrote:

See http://www.xldynamic.com/source/xld.ColourCounter.html for a working
example

--

HTH

Bob

"Atiq" wrote in message
...
Hello experts,

I have an excel workhseet where different cells are filled with different
colors. I need to count no of cells in a specific column with a specific
colour filled. For example i need to count how many cells are filled with
green color and how many with red etc. What formula i should use?

Thanks in advance,
Atiq



.

  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 834
Default Counting of cells with a specific color filled

No, that is impossible without seeing the workbook, and what you have done
to it, unless you can give a much more detailed explanation.

--

HTH

Bob

"Atiq" wrote in message
...
Thanks Bob.
I went through this link and followed instructions. Now forumal is giving
no
errors but result of formula is 0 though there are 20 cells in that
specified
range (A1:A100) filled with Red color.

Can you please advise whether i am making any mistake?

Thanks in advance, Atiq

"Bob Phillips" wrote:

See http://www.xldynamic.com/source/xld.ColourCounter.html for a working
example

--

HTH

Bob

"Atiq" wrote in message
...
Hello experts,

I have an excel workhseet where different cells are filled with
different
colors. I need to count no of cells in a specific column with a
specific
colour filled. For example i need to count how many cells are filled
with
green color and how many with red etc. What formula i should use?

Thanks in advance,
Atiq



.



  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Counting of cells with a specific color filled

If you just need a count of those colored cells you can use the COUNT
function on the Status Bar.

Select your range of data then EditFindFormatFormat.

Choose a color and Find All.

In the "Found" dialog hit CTRL + a to select all the found cells.

Right-click on Status Bar and Count.


Gord Dibben MS Excel MVP

On Thu, 11 Mar 2010 07:02:01 -0800, Atiq
wrote:

Cells are filled manually with a specific color, not with COUNTIF() function.
Do i need to learn VB to perform this calculation?

"dlw" wrote:

use the COUNTIF() function, the criteria is whatever was used in conditional
formatting to change the color fill of the cell. If conditional formatting
was not used to color the cell, you can't do it. (unless you use Visual
Basic programming)

"Atiq" wrote:

Hello experts,

I have an excel workhseet where different cells are filled with different
colors. I need to count no of cells in a specific column with a specific
colour filled. For example i need to count how many cells are filled with
green color and how many with red etc. What formula i should use?

Thanks in advance,
Atiq


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 cells of a specific color Blue Max Excel Worksheet Functions 8 January 31st 09 09:56 PM
Counting cells with a specific fill color Counting Cells With Fill Color Excel Discussion (Misc queries) 2 April 3rd 08 05:44 PM
Counting color filled cells? For an Idiot. [email protected] Excel Discussion (Misc queries) 6 August 8th 07 01:34 AM
Counting filled cells in excel Alex Wilson Excel Worksheet Functions 5 September 19th 05 11:01 PM
Counting blank and filled cells within a range. greg7468 Excel Discussion (Misc queries) 3 June 28th 05 10:41 PM


All times are GMT +1. The time now is 08:29 AM.

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"