Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 14
Default I'd like to know how we can count coloured cells?

I'd like to know how we can count coloured cells?

i.e

If cells A1 C1 E1 F1 and G1 are coloured, Id like to know how I can see the
total coloured cells in H1?

I suppose its a little bit more complicated than it looks. Any help would
be appreciated. Thank you.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default I'd like to know how we can count coloured cells?

If they are coloured by conditional formatting, use those conditions to
count the cells.
If the cells are formatted separately, you can't do it with a formula; it
needs VBA.
--
David Biddulph

"Atomic" wrote in message
...
I'd like to know how we can count coloured cells?

i.e

If cells A1 C1 E1 F1 and G1 are coloured, I'd like to know how I can see
the
total coloured cells in H1?

I suppose it's a little bit more complicated than it looks. Any help would
be appreciated. Thank you.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default I'd like to know how we can count coloured cells?

Hi,

Excel has no inbuilt functions for this but here's a user defined function
(UDF)

Alt + f11 to open VB editor and right click 'ThisWorkbook' and insert nodule
and paste the code below in.

Call with
=countcolour("A1:H1")

or any other range you want

Function countcolour(rng As Range) As Long
For Each c In rng
If c.Interior.ColorIndex < xlNone Then
countcolour = countcolour + 1
End If
Next
End Function

Mike

"Atomic" wrote:

I'd like to know how we can count coloured cells?

i.e

If cells A1 C1 E1 F1 and G1 are coloured, Id like to know how I can see the
total coloured cells in H1?

I suppose its a little bit more complicated than it looks. Any help would
be appreciated. Thank you.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,203
Default I'd like to know how we can count coloured cells?

See if this doesn't get you started:
http://www.ozgrid.com/VBA/sum-count-cells-by-color.htm


"Atomic" wrote:

I'd like to know how we can count coloured cells?

i.e

If cells A1 C1 E1 F1 and G1 are coloured, Id like to know how I can see the
total coloured cells in H1?

I suppose its a little bit more complicated than it looks. Any help would
be appreciated. Thank you.

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
Count using Coloured Cells enna49 Excel Discussion (Misc queries) 2 January 20th 09 09:58 AM
Is there an Excel forumla to count different coloured cells? dataprincess Excel Discussion (Misc queries) 2 November 22nd 07 11:29 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 04:49 PM.

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"