Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 553
Default Updating Values For Custom Formulas

Hi,

I have created a custom function to shorten a lengthy sumproduct formula.
However, when the source cells' values are changed the custom function's
results are not automatically updated & I have to press F9, while the
original lengthy formula updates automatically.

What might be the reason? How can the same be done so.

Thanx!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Updating Values For Custom Formulas

You can add this line of code to your function:

Application.Volatile

Like this:

Function MyFunct(......)
Application.Volatile

However, this will cause the function to recalculate *every time* a
calculation happens even if the dependent cells didn't change. In which case
your original lengthy formula is probably a better choice.


--
Biff
Microsoft Excel MVP


"FARAZ QURESHI" wrote in message
...
Hi,

I have created a custom function to shorten a lengthy sumproduct formula.
However, when the source cells' values are changed the custom function's
results are not automatically updated & I have to press F9, while the
original lengthy formula updates automatically.

What might be the reason? How can the same be done so.

Thanx!



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,440
Default Updating Values For Custom Formulas

In addition to Biff's advice:

The best way is to include all input cells in the argument list. That is the only way Excel recognizes the dependencies correctly.
Then the function calls will be recalculated when and only when needed.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"T. Valko" wrote in message ...
| You can add this line of code to your function:
|
| Application.Volatile
|
| Like this:
|
| Function MyFunct(......)
| Application.Volatile
|
| However, this will cause the function to recalculate *every time* a
| calculation happens even if the dependent cells didn't change. In which case
| your original lengthy formula is probably a better choice.
|
|
| --
| Biff
| Microsoft Excel MVP
|
|
| "FARAZ QURESHI" wrote in message
| ...
| Hi,
|
| I have created a custom function to shorten a lengthy sumproduct formula.
| However, when the source cells' values are changed the custom function's
| results are not automatically updated & I have to press F9, while the
| original lengthy formula updates automatically.
|
| What might be the reason? How can the same be done so.
|
| Thanx!
|
|


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
Pivot custom chart not updating mgrlog Charts and Charting in Excel 1 November 13th 07 08:38 AM
Updating the date in Custom Header mjlevie Excel Discussion (Misc queries) 2 June 27th 07 08:54 PM
Custom functions not updating when dependant cells are edited Hamish Excel Discussion (Misc queries) 1 November 24th 06 03:01 PM
Custom Function not updating lister_d_000169 Excel Worksheet Functions 2 March 30th 06 10:03 AM
Custom Function not updating lister_d_000169 Excel Worksheet Functions 0 March 29th 06 08:38 PM


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