ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Count - Coloured Cells (https://www.excelbanter.com/excel-programming/416161-count-coloured-cells.html)

SANDIND[_2_]

Count - Coloured Cells
 
Hi All,

I am working on one sheet in which one cloumn has either Yes or No. I am
involve in the process of reviewing the sheet and once I am done with any
cell then I colour that in blue(using fill colour).

I want to count either of Yes or No which have been coloured Blue. Is it
possible.

Even if I filter i get Yes or No , both whethered coloured or not. Please
Help.

Thanks
SS

Otto Moehrbach[_2_]

Count - Coloured Cells
 
If you want to do what you do with colored cells, then you will need VBA to
count those cells. This macro will do that. I assumed the column with the
colored cells is H and that your data starts in row 2. HTH Otto
Sub CountBlue()
Dim rColH As Range, i As Range, c As Long
Set rColH = Range("H2", Range("H" & Rows.Count).End(xlUp))
c = 0
For Each i In rColH
If i.Interior.ColorIndex = 41 Then _
c = c + 1
Next i
MsgBox c
End Sub
"SANDIND" wrote in message
...
Hi All,

I am working on one sheet in which one cloumn has either Yes or No. I am
involve in the process of reviewing the sheet and once I am done with any
cell then I colour that in blue(using fill colour).

I want to count either of Yes or No which have been coloured Blue. Is it
possible.

Even if I filter i get Yes or No , both whethered coloured or not. Please
Help.

Thanks
SS



SANDIND[_2_]

Count - Coloured Cells
 
Thanks Otto for your quick response.

SS

"Otto Moehrbach" wrote:

If you want to do what you do with colored cells, then you will need VBA to
count those cells. This macro will do that. I assumed the column with the
colored cells is H and that your data starts in row 2. HTH Otto
Sub CountBlue()
Dim rColH As Range, i As Range, c As Long
Set rColH = Range("H2", Range("H" & Rows.Count).End(xlUp))
c = 0
For Each i In rColH
If i.Interior.ColorIndex = 41 Then _
c = c + 1
Next i
MsgBox c
End Sub
"SANDIND" wrote in message
...
Hi All,

I am working on one sheet in which one cloumn has either Yes or No. I am
involve in the process of reviewing the sheet and once I am done with any
cell then I colour that in blue(using fill colour).

I want to count either of Yes or No which have been coloured Blue. Is it
possible.

Even if I filter i get Yes or No , both whethered coloured or not. Please
Help.

Thanks
SS




Nigel[_2_]

Count - Coloured Cells
 
If you are using xl2007 then you can filter by colour, include a subtotal
formula for the full range to be filtered and count the cells after
filtering.

--

Regards,
Nigel




"SANDIND" wrote in message
...
Hi All,

I am working on one sheet in which one cloumn has either Yes or No. I am
involve in the process of reviewing the sheet and once I am done with any
cell then I colour that in blue(using fill colour).

I want to count either of Yes or No which have been coloured Blue. Is it
possible.

Even if I filter i get Yes or No , both whethered coloured or not. Please
Help.

Thanks
SS




All times are GMT +1. The time now is 02:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com