Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default interior colored cells counting

Hi,
There is a column with dates or empty cells. Some of the cells having
dates has "yellow" background color. I would like to count only the
"yellow" cells. I realized that in this case I am not able to use
DCOUNT because I don't know how to filer to "yellow" bg color. Thank
you for any help.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 621
Default interior colored cells counting

How do the cells receive the color?

Manually or by conditional formattting?

Which version of Excel?

2007 can filter by color if manually colored.

Earlier versions can not.

If by CF, what is the criterion for "yellow" cells.?


Gord Dibben MS Excel MVP

On Sun, 17 Oct 2010 08:44:03 -0700 (PDT), Konczér, Tamás
wrote:

Hi,
There is a column with dates or empty cells. Some of the cells having
dates has "yellow" background color. I would like to count only the
"yellow" cells. I realized that in this case I am not able to use
DCOUNT because I don't know how to filer to "yellow" bg color. Thank
you for any help.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default interior colored cells counting

Hi Gord,
thank you for your comments. These are manually formatted cells, under
Office 2003 (company laptop).

However I use Off2007 on my home comp., how should I filter for
color?

How do the cells receive the color?

Manually or by conditional formattting?

Which version of Excel?

2007 can filter by color if manually colored.

Earlier versions can not.

If by CF, what is the criterion for "yellow" cells.?

Gord Dibben * * MS Excel MVP

On Sun, 17 Oct 2010 08:44:03 -0700 (PDT), Konczér, Tamás
wrote:

Hi,
There is a column with dates or empty cells. Some of the cells having
dates has "yellow" background color. I would like to count only the
"yellow" cells. I realized that in this case I am not able to use
DCOUNT because I don't know how to filer to "yellow" bg color. Thank
you for any help.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 621
Default interior colored cells counting

2007 version

On Ribbon..............DataSort and FilterFilterFilter by Color

2003 would require VBA function to return cell color index number on which you
filter.

Function CellColorIndex(InRange As Range, Optional _
OfText As Boolean = False) As Integer
'
' This function returns the ColorIndex value of a the Interior
' (background) of a cell, or, if OfText is true, of the Font in the cell.
'
Application.Volatile True
If OfText = True Then
CellColorIndex = InRange.Font.ColorIndex
Else
CellColorIndex = InRange.Interior.ColorIndex
End If
End Function

In an adjacent column enter =CellColorIndex(cellref)

Drag/copy down then filter on the number you want.

See Chip Pearson's site for more on that.

http://www.cpearson.com/excel/colors.aspx

Note this bit........................

You can download a module file that contains all the code on this page. The
various procedures within the modColorFunctions.bas module call upon one
another, so you should import the entire module into your project, rather than
copying single procedures.


Gord

On Sun, 17 Oct 2010 12:06:35 -0700 (PDT), Konczér, Tamás
wrote:

Hi Gord,
thank you for your comments. These are manually formatted cells, under
Office 2003 (company laptop).

However I use Off2007 on my home comp., how should I filter for
color?

How do the cells receive the color?

Manually or by conditional formattting?

Which version of Excel?

2007 can filter by color if manually colored.

Earlier versions can not.

If by CF, what is the criterion for "yellow" cells.?

Gord Dibben * * MS Excel MVP

On Sun, 17 Oct 2010 08:44:03 -0700 (PDT), Konczér, Tamás
wrote:

Hi,
There is a column with dates or empty cells. Some of the cells having
dates has "yellow" background color. I would like to count only the
"yellow" cells. I realized that in this case I am not able to use
DCOUNT because I don't know how to filer to "yellow" bg color. Thank
you for any help.

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
Counting colored cells Joebeone Excel Worksheet Functions 3 August 6th 08 10:20 PM
Counting colored cells Niall 84 Excel Programming 6 May 21st 08 11:54 AM
Counting colored cells Bob59 Excel Discussion (Misc queries) 2 May 20th 08 08:33 AM
Counting Colored Cells jvbelg Excel Programming 2 May 2nd 08 05:16 PM
counting colored cells James P Excel Discussion (Misc queries) 2 June 14th 06 05:39 PM


All times are GMT +1. The time now is 10:04 PM.

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

About Us

"It's about Microsoft Excel"