Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 54
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default 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   Report Post  
Posted to microsoft.public.excel.misc
JB JB is offline
external usenet poster
 
Posts: 115
Default 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
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
Is there an Excel forumla to count different coloured cells? dataprincess Excel Discussion (Misc queries) 2 November 22nd 07 11:29 PM
XL2003: Count formatted cells (not coloured)... Birmangirl Excel Worksheet Functions 0 October 19th 06 01:16 PM
Count coloured cells in range Alberto Pinto Excel Worksheet Functions 2 July 20th 06 07:33 PM
Count coloured cells in a range [email protected] Excel Worksheet Functions 3 July 20th 06 01:48 PM
count coloured cells ile Excel Worksheet Functions 4 June 19th 06 08:38 AM


All times are GMT +1. The time now is 01:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"