Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all.
I realize that this will probably be a weird macro, but I want to sum a group of cells that are not in series. I.e., it'll all be in the same column, but there will be jumps between rows. Some of the row spacing will be quite far, and others can be in series. It seems to me that if I use some type of formatting-- such as color-- I should be able to use an if, or sumif function to sum all the cells that I need to sum. I'm doing this because some of the tests that I've run are giving me mixed numbers, and I want to go back and make sure that I did not miss any of the cells I need to include in my sum/tally function. The question I have is: Can I make a macro to look at the color of the cell, and if it's the color I've chosen, include that in the range of cells I want totalled? If so, how would I write that? Here's how I'm seeing it in my mind right now. Sub ColorSum() Dim color as CellFormat if (color = 12) ' where 12 is the color of my choosing sum(range) ' where range is the range of cells to be summed. end if End Sub Simplistic, and wrong, I'm sure, but I want something to that effect. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
weird macro behavior | Excel Discussion (Misc queries) | |||
really weird copy macro problem | Excel Programming | |||
Macro is weird! | Excel Programming | |||
Weird Macro Problem | Excel Programming | |||
Weird template/macro behavior ?? | Excel Programming |