Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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
|
|||
|
|||
Quote:
Try this. http://www.ozgrid.com/VBA/sum-count-cells-by-color.htm |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
is there a way of keeping alternat rows differently coloured | Excel Discussion (Misc queries) | |||
Coloured rows | New Users to Excel | |||
code for hiding rows-(coloured) | Excel Programming | |||
Coloured rows | New Users to Excel | |||
Coloured rows | New Users to Excel |