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

I have a report with multiple columns and rows, this is
reviewed for errors and any that are found are highlighted
yellow. What I am wanting to do is be able to say "count
any cell highlighted in yellow and sum" Does anyone know
if this can be done or am I just dreaming??
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Highlighting

Hi Lisa,
try this:

Sub CountYellow()

Dim counter As Integer
Dim r As Range
counter = 0

Set r = Range("A1", Range("A1").SpecialCells(xlLastCell))
For Each c In r.cells
If c.Interior.ColorIndex = 6 Then counter = counter + 1
Next
MsgBox counter
End Sub


Maybe you will need to change the Colorindex, it depends on which yellow you
use.
You can also modify the MsgBox to show you some additional informations ;-)

Regards
Filip



"Lisa" píse v diskusním príspevku
...
I have a report with multiple columns and rows, this is
reviewed for errors and any that are found are highlighted
yellow. What I am wanting to do is be able to say "count
any cell highlighted in yellow and sum" Does anyone know
if this can be done or am I just dreaming??



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
highlighting Jane Griffel[_2_] Excel Discussion (Misc queries) 2 February 11th 09 06:07 PM
highlighting Jade Excel Discussion (Misc queries) 1 July 2nd 08 04:54 PM
Highlighting a Row Fufu Excel Worksheet Functions 2 March 17th 06 10:16 PM
Highlighting Richard Excel Discussion (Misc queries) 5 November 30th 05 08:03 PM
Highlighting blanks via GO TO SPECIAL is not highlighting blank cells - HELP, I'm totally stuck. Jamie Furlong Excel Discussion (Misc queries) 6 August 28th 05 09:27 PM


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