Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 79
Default function to re-calculate when cell format (colour) changes

I have a UDF which looks up all cells of a particualr colour in a range and
sums the cell values. However, the function does not re-calculate when the
colour of the cells in the range changes. How can I get this to work?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 968
Default function to re-calculate when cell format (colour) changes

You will need to make your UDF volatile:
- add somewhere near the start
Application.Volatile

This will make the function recalculate each time Excel recalculates, but
just changing the colour and nothing else does not trigger the need for
Excel to calculate.

So if the only change you make is the colour of a cell you need to press F9
to make Excel calculate.

Charles
__________________________________________________
The Excel Calculation Site
http://www.decisionmodels.com

"PBcorn" wrote in message
...
I have a UDF which looks up all cells of a particualr colour in a range
and
sums the cell values. However, the function does not re-calculate when the
colour of the cells in the range changes. How can I get this to work?



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
Can I Sum by Cell Colour or Format? Ashley Excel Discussion (Misc queries) 1 February 17th 10 07:05 PM
Format Cell Colour scottymelloty Excel Worksheet Functions 0 November 18th 04 04:13 PM
Format Cell Colour scottymelloty Excel Worksheet Functions 0 November 18th 04 04:08 PM
Format Cell Colour scottymelloty Excel Worksheet Functions 2 November 17th 04 08:19 PM
Conditional Format with VBA - Interior Colour of cell based on value from in-cell dropdown Steve[_52_] Excel Programming 5 June 15th 04 11:45 AM


All times are GMT +1. The time now is 04:17 PM.

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"