Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Member
 
Posts: 36
Default Please help me to get count of colored excel Rows

Hi,

Please help me to get count of colored excel Rows

Data Having 125 Rows, Row No : 50 and Row No : 75 are colored with blue

When opening the file Need Message How many rows are colored

Please Help me.

Last edited by Moideen : March 12th 12 at 09:14 AM
  #2   Report Post  
Senior Member
 
Posts: 663
Default

Quote:
Originally Posted by Moideen View Post
Hai,

Please help me to get count rows of coloured.

Data Having 125 Rows, Row No : 50 and Row No : 75 are coloured with blue

Need MSG on Row1 "2 Rows are colored" is there any function in excel 2007 for this.
You'll be needing a "User Defined Function" then...

Try this.
http://www.ozgrid.com/VBA/sum-count-cells-by-color.htm
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 259
Default How many rows are coloured

On 12/03/2012 5:22 AM, Moideen wrote:
Hai,

Please help me to get count rows of coloured.

Data Having 125 Rows, Row No : 50 and Row No : 75 are coloured with
blue

Need MSG on Row1 "2 Rows are colored" is there any function in excel
2007 for this.





Hi

There is most likely a better code out there, I have seen one, just
can't locate it, that said! I have tested the below and it does the job
well ( assuming you are using the standard Blue = 12611584 ).

Record a Macro and change a cell to your desired color and change the
code to reflect.

Sub CountColor()

Dim tCell As Range 'Total colored Cells
Dim hRng As Range 'Helper Count Range
Dim myRng As Range 'Range of Column A
Dim c As Range

Set tCell = [A1] 'Displays Total color Cells
Set hRng = Range("B2:B10") '**Change Range to suit
Set myRng = Range("A2:A10") 'Change Range to suit

For Each c In myRng
If c.Interior.Color = 12611584 Then
c.Offset(0, 1).Value = 1 '**Change number of Columns to offset
End If
Next c

tCell = WorksheetFunction.Sum(hRng) & " Cells are Colored"

End Sub

HTH
Mick.

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
is there a way of keeping alternat rows differently coloured des-sa[_2_] Excel Discussion (Misc queries) 3 May 17th 08 04:17 AM
Coloured rows Tim New Users to Excel 9 November 28th 06 02:11 AM
code for hiding rows-(coloured) srinivasan Excel Programming 7 August 24th 05 11:26 AM
Coloured rows sonic-the-mouse New Users to Excel 1 May 29th 05 06:21 PM
Coloured rows sonic-the-mouse New Users to Excel 2 May 29th 05 01:16 AM


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