Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Fill Color is added to additional rows | Excel Discussion (Misc queries) | |||
Fill cells with color based on criteria in two cells | Excel Worksheet Functions | |||
HOW TO FORMATE CELLS TO COUNT CELLS WITH A FILL COLOR? | New Users to Excel | |||
Excel 2003 will not display color fonts or color fill cells | Excel Worksheet Functions | |||
My excel 2003 wont let me fill cells with color or color the tabs. | New Users to Excel |