LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 414
Default weird macro

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
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
weird macro behavior Dave F Excel Discussion (Misc queries) 0 November 30th 06 03:35 PM
really weird copy macro problem gillrajb Excel Programming 0 June 6th 06 03:11 PM
Macro is weird! toolroomman Excel Programming 4 August 29th 05 09:49 PM
Weird Macro Problem Bruce001 Excel Programming 6 August 26th 05 03:20 AM
Weird template/macro behavior ?? David Excel Programming 0 August 12th 03 04:33 PM


All times are GMT +1. The time now is 07:54 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"