Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Color fill cells to be added into totals

I want to color fill certain cells in a column and then have excel total the
colored cells of that column into a total cell. How do I do this? Alan
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 179
Default Color fill cells to be added into totals

Hi Alan

I don't know how easy that will be with formulas (or if even possible)
I would say use VBA.

something like:

Sub ColorCellCalc()

Dim wantedColumn as byte
Dim Sh_ as worksheet
Dim Tot_ as Double

Set Sh_ = Worksheets("Sheet1")
wantedColumn = 2 'which would be B, change it if you need a different one

For i = 1 to Sh_.cells(65536,wantedColumn).end(xlup).row
if Sh_.cells(i,wantedColumn).interior.colorindex < xlnone then
Tot_ = Tot_ + Sh_.cells(i,wantedColumn)
end if

next i

Sh_.range("A1").value = Tot_

End Sub

hth

Carlo
"hoolieo" wrote:

I want to color fill certain cells in a column and then have excel total the
colored cells of that column into a total cell. How do I do this? Alan

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
Fill Color is added to additional rows Historian Excel Discussion (Misc queries) 2 June 25th 07 08:47 PM
Fill cells with color based on criteria in two cells AA Excel Worksheet Functions 2 January 2nd 06 11:29 PM
HOW TO FORMATE CELLS TO COUNT CELLS WITH A FILL COLOR? Moore New Users to Excel 1 June 15th 05 06:41 PM
Excel 2003 will not display color fonts or color fill cells DaveC Excel Worksheet Functions 1 April 11th 05 04:38 PM
My excel 2003 wont let me fill cells with color or color the tabs. trizog New Users to Excel 2 February 22nd 05 06:43 PM


All times are GMT +1. The time now is 06:36 AM.

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"