Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default add up a list of values depending on the color of the cell

Hello to you all,

Maybe a simple question, but I can't find the answer right now.

I have a list of values which have to be add up and give me a total.
Only I want to be able to leave out certain values, not by setting them to
zero but by giving the cell a different color.
(sheet already uses these colors to show something)

eg.
1
2
3
4
5

Total = 15

If cell with 2 is colored red, total should show 13.

How can this be done in macro's.
How do I get it to run after a change of color in the sheet. (macro should
run instandly)

Thanks in advance,

Kimball





(something like recalcute at opening or via a short-key)


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default add up a list of values depending on the color of the cell

See Chip Pearson's site for a SumByColor Function.

Note Chip's caveat about changing a color not triggering event code.

Also note CF colors caveat.

http://www.cpearson.com/excel/colors.htm


Gord Dibben MS Excel MVP

On Tue, 17 Oct 2006 12:11:44 +0200, "Kimball"
wrote:

Hello to you all,

Maybe a simple question, but I can't find the answer right now.

I have a list of values which have to be add up and give me a total.
Only I want to be able to leave out certain values, not by setting them to
zero but by giving the cell a different color.
(sheet already uses these colors to show something)

eg.
1
2
3
4
5

Total = 15

If cell with 2 is colored red, total should show 13.

How can this be done in macro's.
How do I get it to run after a change of color in the sheet. (macro should
run instandly)

Thanks in advance,

Kimball





(something like recalcute at opening or via a short-key)


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
find a cell matching separate column and row values LQEngineer Excel Worksheet Functions 2 July 26th 06 07:10 AM
How to count the number of 'values' in a cell Sandih Excel Worksheet Functions 1 July 11th 06 09:00 AM
How do I generate a list from a range of values robo7084 Excel Worksheet Functions 2 July 6th 06 01:48 AM
Compiling macro based on cell values simonsmith Excel Discussion (Misc queries) 1 May 16th 06 08:31 PM
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM


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