If you were looking to find how many yellows, and how many reds there are, then I would modify NOORAIN's code a little like so
Function COLORCOUNT(rngArrayCells As Range, rngColorCell As Range) Dim rngCell As Range, lngCells As Long For Each rngCell In rngArrayCells If rngCell.Interior.ColorIndex = rngColorCell.Interior.ColorIndex Then lngCells = lngCells + 1 End If Next rngCell COLORCOUNT = lngCells End Function Regards, Sam Mathai Chacko (GL) On Wed, Oct 19, 2011 at 6:21 PM, ashish koul <koul.ash...@gmail.com> wrote: > > http://www.excelvbamacros.com/2011/02/function-to-count-cells-on-basis-of.html > > > http://www.excelvbamacros.com/2011/02/function-to-count-specific-fill-or.html > > http://www.excelvbamacros.com/2011/02/function-to-sum-specific-fill-or.html > > http://www.excelvbamacros.com/2011/02/function-to-sum-cells-on-basis-of-font.html > > > On Wed, Oct 19, 2011 at 5:19 PM, NOORAIN ANSARI > <noorain.ans...@gmail.com>wrote: > >> [Revised] >> >> Dear Naresh, >> >> Please try it.. >> >> *Function Color_Count(mycell As Range) >> i = 0 >> For Each Rng In mycell >> If Rng.Interior.ColorIndex > 0 Then >> i = i + 1 >> End If >> Next >> Color_Count = i >> End Function* >> >> >> Thanks & regards, >> Noorain Ansari >> *http://excelmacroworld.blogspot.com/*<http://excelmacroworld.blogspot.com/> >> *http://noorain-ansari.blogspot.com/*<http://noorain-ansari.blogspot.com/> >> >> >> On Wed, Oct 19, 2011 at 5:00 PM, NOORAIN ANSARI <noorain.ans...@gmail.com >> > wrote: >> >>> Dear Naresh, >>> >>> please see attached sheet, i hope it will help to u.. >>> >>> -- >>> On Wed, Oct 19, 2011 at 4:21 PM, naresh v <naresh.veerabo...@gmail.com >>> > wrote: >>> >>>> Hi Friends, >>>> >>>> I have a question to count blank cells with color. Is there >>>> any function to count colors? please help me.... >>>> >>>> >>>> >>>> -- >>>> >>>> ---------------------------------------------------------------------------------- >>>> Some important links for excel users: >>>> 1. Follow us on TWITTER for tips tricks and links : >>>> http://twitter.com/exceldailytip >>>> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 >>>> 3. Excel tutorials at http://www.excel-macros.blogspot.com >>>> 4. Learn VBA Macros at http://www.quickvba.blogspot.com >>>> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com >>>> >>>> To post to this group, send email to excel-macros@googlegroups.com >>>> >>>> <><><><><><><><><><><><><><><><><><><><><><> >>>> Like our page on facebook , Just follow below link >>>> http://www.facebook.com/discussexcel >>>> >>> >>> >>> >>> >> >> >> -- >> Thanks & regards, >> Noorain Ansari >> *http://excelmacroworld.blogspot.com/*<http://excelmacroworld.blogspot.com/> >> *http://noorain-ansari.blogspot.com/*<http://noorain-ansari.blogspot.com/> >> >> -- >> >> ---------------------------------------------------------------------------------- >> Some important links for excel users: >> 1. Follow us on TWITTER for tips tricks and links : >> http://twitter.com/exceldailytip >> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 >> 3. Excel tutorials at http://www.excel-macros.blogspot.com >> 4. Learn VBA Macros at http://www.quickvba.blogspot.com >> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com >> >> To post to this group, send email to excel-macros@googlegroups.com >> >> <><><><><><><><><><><><><><><><><><><><><><> >> Like our page on facebook , Just follow below link >> http://www.facebook.com/discussexcel >> > > > > -- > *Regards* > * * > *Ashish Koul* > *http://www.excelvbamacros.com/* > > > P Before printing, think about the environment. > > > -- > > ---------------------------------------------------------------------------------- > Some important links for excel users: > 1. Follow us on TWITTER for tips tricks and links : > http://twitter.com/exceldailytip > 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 > 3. Excel tutorials at http://www.excel-macros.blogspot.com > 4. Learn VBA Macros at http://www.quickvba.blogspot.com > 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com > > To post to this group, send email to excel-macros@googlegroups.com > > <><><><><><><><><><><><><><><><><><><><><><> > Like our page on facebook , Just follow below link > http://www.facebook.com/discussexcel > -- Sam Mathai Chacko -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/discussexcel
CountCellColor.xlsm
Description: Binary data