ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Custom Function not being auto calculated when cells change..help? (https://www.excelbanter.com/excel-worksheet-functions/18751-custom-function-not-being-auto-calculated-when-cells-change-help.html)

Alex Wolff

Custom Function not being auto calculated when cells change..help?
 
I created a custom function (See below)
Which takes validated input from 7 other cells parses using MID and
concantenates and returns the result into an 8th cell. WHen I change the
contents of any of the cells the value is not updated in the 8th cell...Even
if I press F9 it wont update it. I have to place the cursor in the 8th cell
and press enter once to get the updated value.

Is there a way to correct this behavior? In my options I have auto
calculate turned on.


JulieD

Hi Alex

the discussion at
http://tinyurl.com/42q34

especially Dick Kusleika's comments might interest you

Cheers
JulieD



"Alex Wolff" wrote in message
...
I created a custom function (See below)
Which takes validated input from 7 other cells parses using MID and
concantenates and returns the result into an 8th cell. WHen I change the
contents of any of the cells the value is not updated in the 8th
cell...Even
if I press F9 it wont update it. I have to place the cursor in the 8th
cell
and press enter once to get the updated value.

Is there a way to correct this behavior? In my options I have auto
calculate turned on.




Don Guillett

Your udf was not shown but try, as the first line
application.volatile

--
Don Guillett
SalesAid Software

"Alex Wolff" wrote in message
...
I created a custom function (See below)
Which takes validated input from 7 other cells parses using MID and
concantenates and returns the result into an 8th cell. WHen I change the
contents of any of the cells the value is not updated in the 8th

cell...Even
if I press F9 it wont update it. I have to place the cursor in the 8th

cell
and press enter once to get the updated value.

Is there a way to correct this behavior? In my options I have auto
calculate turned on.




Bernd Plumhoff

Use application.volatile in your code. See
http://www.sulprobil.com/html/uniqrandint.html for example.

HTH,
Bernd

Dave Peterson

You didn't show your code, but it's usually best to pass the ranges to the
function.

That way excel knows when you change one of those cells, it's time to
recalculate your UDF.



Alex Wolff wrote:

I created a custom function (See below)
Which takes validated input from 7 other cells parses using MID and
concantenates and returns the result into an 8th cell. WHen I change the
contents of any of the cells the value is not updated in the 8th cell...Even
if I press F9 it wont update it. I have to place the cursor in the 8th cell
and press enter once to get the updated value.

Is there a way to correct this behavior? In my options I have auto
calculate turned on.


--

Dave Peterson


All times are GMT +1. The time now is 03:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com