Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Is there a fuction that counts number of highlighted cells Excell

I want to total the number of highlighted or specific fill color cells in a
range. The data in the cell in not my concer just the highlight or fill.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Is there a fuction that counts number of highlighted cells Excell

Call with below call. Note: The code below will not automatically update
when color get changed. Color changes do not cause a recalculation of the
spreadsheet.


=FilledCells(B7:D10)


Function FilledCells(Target As Range)
Count = 0
For Each Cell In Target
If Cell.Interior.ColorIndex < xlNone Then
Count = Count + 1
End If
Next Cell
FilledCells = Count
End Function"bstrack" wrote:

I want to total the number of highlighted or specific fill color cells in a
range. The data in the cell in not my concer just the highlight or fill.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Is there a fuction that counts number of highlighted cells Exc

Hi Joel, you didn't include the cell colored by conditional formatting. they
have to have the FormatCondidtions(1) thing thrown in like:

If Cell.FormatConditions(1).Interior.ColorIndex < xlNone

"Joel" wrote:

Call with below call. Note: The code below will not automatically update
when color get changed. Color changes do not cause a recalculation of the
spreadsheet.


=FilledCells(B7:D10)


Function FilledCells(Target As Range)
Count = 0
For Each Cell In Target
If Cell.Interior.ColorIndex < xlNone Then
Count = Count + 1
End If
Next Cell
FilledCells = Count
End Function"bstrack" wrote:

I want to total the number of highlighted or specific fill color cells in a
range. The data in the cell in not my concer just the highlight or fill.

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
How do I create a function that counts number of cells in a series Demosthenes Excel Worksheet Functions 3 August 3rd 09 05:22 PM
how to turn off highlighted cells when openning an excell file Alexandra Excel Discussion (Misc queries) 0 August 31st 07 11:56 AM
Count number of cells that are highlighted Barb Reinhardt Excel Programming 4 June 8th 06 10:34 PM
a function that counts the number of cells with information zuri125 Excel Worksheet Functions 1 June 7th 06 07:37 AM
Is there a way to count the number of highlighted cells in a col? Alicia Excel Discussion (Misc queries) 2 February 23rd 06 05:52 PM


All times are GMT +1. The time now is 09:54 AM.

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"