Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Counting highlighted cells?
Is there a way to count cells in a column which have been highlighted or text
that has been italicised??. As i have a column full of dates, and when something is completed the suggested date is changed to the actual date, highlighted and italicised. I need to keep a count on the completed dates. |
#3
|
|||
|
|||
There is a solution at
http://www.xldynamic.com/source/xld.ColourCounter.html that shows how to count coloured text/cells. Frank Kabel wrote a textstyle function that we used in this concept, which is given below '--------------------------------------------------------------------------- Function TextStyle(rng As Range, _ Optional iStyle As Integer = 1) As Variant '--------------------------------------------------------------------------- Dim cell As Range, row As Range Dim i As Long, j As Long Dim aryStyle As Variant Application.Volatile If rng.Areas.Count 1 Then TextStyle = CVErr(xlErrValue) Exit Function End If If rng.Cells.Count = 1 Then Select Case iStyle Case 1: aryStyle = (rng.Font.Underline < xlUnderlineStyleNone) Case 2: aryStyle = rng.Font.Bold Case 3: aryStyle = rng.Font.Italic End Select Else aryStyle = rng.Value i = 0 For Each row In rng.Rows i = i + 1 j = 0 For Each cell In row.Cells j = j + 1 Select Case iStyle Case 1: aryStyle(i, j) = CBool(cell.Font.Underline < xlUnderlineStyleNone) Case 2: aryStyle(i, j) = CBool(cell.Font.Bold = True) Case 3: aryStyle(i, j) = CBool(cell.Font.Italic) End Select Next cell Next row End If TextStyle = aryStyle End Function -- HTH RP (remove nothere from the email address if mailing direct) "Josh - Westfield Australia" <Josh - Westfield wrote in message ... Is there a way to count cells in a column which have been highlighted or text that has been italicised??. As i have a column full of dates, and when something is completed the suggested date is changed to the actual date, highlighted and italicised. I need to keep a count on the completed dates. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Counting empty cells within a range of cells | New Users to Excel | |||
Counting empty cells within a range of cells | New Users to Excel | |||
counting cells with conditional formatting applied | Excel Discussion (Misc queries) | |||
counting text cells | Excel Worksheet Functions | |||
Counting nonblank and non white space cells | Excel Worksheet Functions |