Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Count using Coloured Cells
Hi
I have followed the threads for this and still getting an error "NAME? Using Excel 2007. I have cells in B1:B17 with numerous colours. A1 to A7 I have a list referencing the colour I would like counted. The formula is in Col D. This is the code I am using. =SUMPRODUCT(--(ColorIndex(B1:B16)=ColorIndex(A6))) Thanks |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Count using Coloured Cells
If you are getting the NAME error, then I would assume that you haven't
defined ColorIndex. As ColorIndex is presumably a user defined function, have you defined it? We don't know to which threads you are referring, as you've started a new thread rather than replying, but I would recommend that you go back and look again at what was recommended. -- David Biddulph "enna49" wrote in message ... Hi I have followed the threads for this and still getting an error "NAME? Using Excel 2007. I have cells in B1:B17 with numerous colours. A1 to A7 I have a list referencing the colour I would like counted. The formula is in Col D. This is the code I am using. =SUMPRODUCT(--(ColorIndex(B1:B16)=ColorIndex(A6))) Thanks |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Count using Coloured Cells
With UDF in a module:
Function BackColor(MyRange As Range) Application.Volatile Dim temp() ReDim temp(1 To MyRange.Count) For i = 1 To MyRange.Count temp(i) = MyRange(i).Interior.ColorIndex Next i BackColor = Application.Transpose(temp) End Function =SOMMEPROD(--(backcolor(B1:B16)=backcolor(A6))) http://cjoint.com/?bwk5YwU1mL JB http://boisgontierjacques.free.fr On 20 jan, 07:19, enna49 wrote: Hi I have followed the threads for this and still getting an error "NAME? Using Excel 2007. I have cells in B1:B17 with numerous colours. *A1 to A7 I have a list referencing the colour I would like counted. * The formula is in Col D. *This is the code I am using. =SUMPRODUCT(--(ColorIndex(B1:B16)=ColorIndex(A6))) Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Is there an Excel forumla to count different coloured cells? | Excel Discussion (Misc queries) | |||
XL2003: Count formatted cells (not coloured)... | Excel Worksheet Functions | |||
Count coloured cells in range | Excel Worksheet Functions | |||
Count coloured cells in a range | Excel Worksheet Functions | |||
count coloured cells | Excel Worksheet Functions |