Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 32
Default How to get Total of Coloured Cell in a Colum and Worksheet

How I get total of highlighted/Coloured Cell in a Colum .
How to get total of highlighted/coloured Cell in a Worksheet.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 140
Default How to get Total of Coloured Cell in a Colum and Worksheet

Hi

A couple of questions spring to mind - Are all the coloured cells the same
colour?

You could use a VBA routine to count the number of coloured cells.
Below is the code I used in a standard VBA module.This assumes that there
are no blank cells in the range.

Sub countColouredCells()
Dim wb As Workbook
Dim ws As Worksheet
Dim rg As Range
Dim i As Integer

Set wb = ThisWorkbook
Set ws = wb.Worksheets(1)
Set rg = ws.Range("B1")
i = 0

Do Until IsEmpty(rg)
If rg.Interior.ColorIndex = 3 Then
i = i + 1
Set rg = rg.Offset(1, 0)
Else
Set rg = rg.Offset(1, 0)
End If
Loop
Debug.Print i
End Sub


"Qazi Ahmad" wrote:

How I get total of highlighted/Coloured Cell in a Colum .
How to get total of highlighted/coloured Cell in a Worksheet.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default How to get Total of Coloured Cell in a Colum and Worksheet

See http://www.xldynamic.com/source/xld.ColourCounter.html for a working
solution

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Qazi Ahmad" wrote in message
...
How I get total of highlighted/Coloured Cell in a Colum .
How to get total of highlighted/coloured Cell in a Worksheet.



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 140
Default How to get Total of Coloured Cell in a Colum and Worksheet

Far better than my solution

"Bob Phillips" wrote:

See http://www.xldynamic.com/source/xld.ColourCounter.html for a working
solution

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Qazi Ahmad" wrote in message
...
How I get total of highlighted/Coloured Cell in a Colum .
How to get total of highlighted/coloured Cell in a Worksheet.




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 32
Default How to get Total of Coloured Cell in a Colum and Worksheet

Dear
I want to clear my Question that in Selected Cell Range I have some colored
cell not all selected raged full on colored cells. I use different colors in
selected range. Now I want to count how many colored cell in range and what
the total to different colors which I use. (Below mentioned VB Module, where
it display Result ??)
Ahmad


"steve_doc" wrote:

Hi

A couple of questions spring to mind - Are all the coloured cells the same
colour?

You could use a VBA routine to count the number of coloured cells.
Below is the code I used in a standard VBA module.This assumes that there
are no blank cells in the range.

Sub countColouredCells()
Dim wb As Workbook
Dim ws As Worksheet
Dim rg As Range
Dim i As Integer

Set wb = ThisWorkbook
Set ws = wb.Worksheets(1)
Set rg = ws.Range("B1")
i = 0

Do Until IsEmpty(rg)
If rg.Interior.ColorIndex = 3 Then
i = i + 1
Set rg = rg.Offset(1, 0)
Else
Set rg = rg.Offset(1, 0)
End If
Loop
Debug.Print i
End Sub


"Qazi Ahmad" wrote:

How I get total of highlighted/Coloured Cell in a Colum .
How to get total of highlighted/coloured Cell in a Worksheet.

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
how to keep the total colum EXCEL Girl Excel Worksheet Functions 5 October 19th 06 09:09 PM
how to total amounts in one colum Quif210786 Excel Worksheet Functions 1 July 24th 06 11:40 AM
total colum using x instesd of numbers what is the formula Chopper-One Excel Worksheet Functions 3 March 5th 06 09:57 PM
find text in column h and total the corresponding numbers if colum adelaide Excel Discussion (Misc queries) 2 February 6th 06 04:47 AM
total a colum using data from another column Duffey Excel Worksheet Functions 5 August 30th 05 06:32 AM


All times are GMT +1. The time now is 06:32 PM.

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"