View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default Formatting a cell calculated by a VBA function

On 5 Dec 2004 12:55:28 -0800, (Andy) wrote:

Sorry I've chosen an incorrect example here, and it's confused the
matter, I tried to simplify it too much. The functions are custom
functions to be used by business anyalst's, the functions connect to
an SQL data source and retrieve information on a number of statistics
about the business, such as the Spot Price of electricity etc, so they
can't be replaced by something else.

The functions would be used in a spreadsheet by the BAs to perform
calculations and it would be handy if the formatting, and visual
indicators could be applied programmatically by the function to help
the BAs view and understand the results.

Thanks
Andy


You may be able to preformat the appropriate cells when you set up the
worksheet; and also use conditional formatting.

If that is not flexible enough, I think you will have to use event triggered
macros to perform the appropriate formatting after the UDF's have changed the
cell.


--ron