Go Back   TechArena Community > Technical Support > Computer Help > Office Help > MS Office Support
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



Does it is possible to have color shading in a Count if cell

MS Office Support


Reply
 
Thread Tools Search this Thread
  #1  
Old 16-02-2012
Member
 
Join Date: Oct 2011
Posts: 89
Does it is possible to have color shading in a Count if cell

Is there a way to count a cell if it has color shading. I have no values in my cells, but they are either shaded a color or not. I only want to count the cells that have color shading in the range I select. Is this possible. I would rather not enter values or text in the cells to count them.

Reply With Quote
  #2  
Old 16-02-2012
Member
 
Join Date: May 2011
Posts: 410
Re: Does it is possible to have color shading in a Count if cell

Try the following code :
Code:
Function CountColor(Color As Range, Range As Range) As Long
Dim C As Range
For Each C In Range
If C.Interior.ColorIndex = Color.Interior.ColorIndex Then
CountColor = CountColor + 1
End If
Next
End Function
I do not knwo how much you know about VBA so here goes. I am assumign that you want to use this function on multiple workbooks and not just the one right now. You will need to save this function to your personel macro work book. To do this you need to go to tools, Macro, record new macro, choose personel macro workbook, Hit the little stop button or go to tools macro stop. Go to Window, Unhide, personel macro workbook. As it is unhid click Alt+F11. This will open the VBA window. Insert Module. Highlight the function from this posting and copy into your module. To use the formula type =COUNTCOLOR( Then click on cell color that you want to know the count of, Click the range that you want to count.
Reply With Quote
  #3  
Old 16-02-2012
Member
 
Join Date: Aug 2011
Posts: 690
Re: Does it is possible to have color shading in a Count if cell

There is no option for this in Microsoft Excel 2007. This application cannot calculate Count IF with color support. And there is no add-in provide for the same also.
Reply With Quote
Reply

  TechArena Community > Technical Support > Computer Help > Office Help > MS Office Support
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Does it is possible to have color shading in a Count if cell"
Thread Thread Starter Forum Replies Last Post
How to change cell color in excel based on text input Chini mao Windows Software 2 06-01-2012 08:19 PM
Change Color of a cell of Gridview control in Asp.Net Bellamy Software Development 5 16-12-2010 10:22 PM
HP Color LaserJet 5 issue with drum count Poushali Hardware Peripherals 4 14-08-2010 11:44 PM
How to put background color for html cell Preetish Software Development 3 07-08-2009 03:32 PM
Excel Added macro for cell color Xylon Software Development 3 19-02-2009 11:15 AM


All times are GMT +5.5. The time now is 07:09 AM.