LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Ola
 
Posts: n/a
Default

Here are a few alternatives:

=SUMPRODUCT(--(CellColor(A2:A28)=3))


VB: Alt+F11 Insert Module: (Copy and paste the below)

Public Function CellColor(myCell As Range) As Variant
Application.Volatile True
CellColor = myCell.Interior.ColorIndex
End Function

Public Function FontColor(myCell As Range) As Variant
FontColor = myCell.Font.ColorIndex
End Function

Public Function NumberFormat(Cell As Range) As String
NumberFormat = Cell.NumberFormat
End Function

Public Function FontBold(myCell As Range) As Variant
FontBold = myCell.Font.Bold
End Function

Have fun
Ola Sandstrom


Note:
You can either use Application.Volatile True or NOW()*0.
Application.Volatile True will make your spreadsheet recalculate everything
-- Excel runs slower.
=FontColor(A17)+NOW()*0 -- faster but messy formulas. In your example that
would be =SUMPRODUCT(--((FontColor(A2:A28)+NOW()*0)=3))

http://www.excelforum.com/showthread...ight=cellcolor


 
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
Searching Columns Aviator Excel Discussion (Misc queries) 3 January 26th 05 11:13 PM
Excel quits responding searching for files not in my documents briancchf Excel Discussion (Misc queries) 0 January 26th 05 06:13 PM
Find (Ctrl +F) not searching all open sheets Caroline Excel Worksheet Functions 2 January 22nd 05 05:45 PM
Formula for Searching & matching two values in excel Chris Excel Discussion (Misc queries) 1 January 7th 05 04:34 PM
Searching for Substrings Within Strings Tiziano Excel Discussion (Misc queries) 8 January 6th 05 03:09 AM


All times are GMT +1. The time now is 05:44 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"