Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Sum partucular cells by colour of sheet

Hi,

I have several sheets of different tab colours, ie, 5 green, 10 blue, etc. I need to be able to sum all 'A1' cells together if they are on a particular coloured tab, ie, "What is the sum of all Blue tab sheets cell A1?"

I would appreciate any help,

Many thanks.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 52
Default Sum partucular cells by colour of sheet

Hi Geoffers
Here's an example code:
N = 0
For Each s In ThisWorkbook.Worksheets
If Worksheets(s.Name).Tab.ColorIndex = 11 Then
N = N + Worksheets(s.Name).Range("A1")
End If
Next s
MsgBox "Sum of cells A1 in dark blue tab sheets is " & N

HTH
Cordially
Pascal



"Geoffers" a écrit dans le message de
...
Hi,

I have several sheets of different tab colours, ie, 5 green, 10 blue, etc.

I need to be able to sum all 'A1' cells together if they are on a
particular coloured tab, ie, "What is the sum of all Blue tab sheets cell
A1?"

I would appreciate any help,

Many thanks.




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Sum partucular cells by colour of sheet

Thank you very much.

"papou" wrote:

Hi Geoffers
Here's an example code:
N = 0
For Each s In ThisWorkbook.Worksheets
If Worksheets(s.Name).Tab.ColorIndex = 11 Then
N = N + Worksheets(s.Name).Range("A1")
End If
Next s
MsgBox "Sum of cells A1 in dark blue tab sheets is " & N

HTH
Cordially
Pascal



"Geoffers" a écrit dans le message de
...
Hi,

I have several sheets of different tab colours, ie, 5 green, 10 blue, etc.

I need to be able to sum all 'A1' cells together if they are on a
particular coloured tab, ie, "What is the sum of all Blue tab sheets cell
A1?"

I would appreciate any help,

Many thanks.





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 protect sheet allowing grouping and ungrouping but alsoallowing changing colour of specific cells Anurag Kothari Excel Discussion (Misc queries) 2 October 13th 09 02:29 PM
Changing all cells in one colour to a different colour Bob Excel Discussion (Misc queries) 3 June 25th 08 02:12 PM
Sheet Background Colour Kaye Excel Discussion (Misc queries) 2 February 12th 07 02:15 AM
can i calculate the number of occurances of a partucular value? sruth Excel Worksheet Functions 3 June 19th 06 08:32 AM
Change Sheet Tab Colour Jenai Excel Discussion (Misc queries) 1 April 22nd 05 06:12 PM


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