ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   calculate now for user defined functions? (https://www.excelbanter.com/excel-programming/353618-calculate-now-user-defined-functions.html)

Mike[_2_]

calculate now for user defined functions?
 
Hi, if I manually or programmatically paste data into 2+ cells with user
defined functions only the first cell's function is executed. Is there some
sort of equivalent to Calculate or some other way to force this? I have
found that if I manually cut the formula from the cell and paste it back
into the same cell, it executes, but that seems hacky and burdensome.

Thanks,
Mike



Jim Thomlinson[_5_]

calculate now for user defined functions?
 
Make your first line in the UDF

Application.Volatile

This will for the UDF to recalucate with each calculation of the sheet.
--
HTH...

Jim Thomlinson


"Mike" wrote:

Hi, if I manually or programmatically paste data into 2+ cells with user
defined functions only the first cell's function is executed. Is there some
sort of equivalent to Calculate or some other way to force this? I have
found that if I manually cut the formula from the cell and paste it back
into the same cell, it executes, but that seems hacky and burdensome.

Thanks,
Mike




me[_9_]

calculate now for user defined functions?
 
Thank you Jim. I tried that, but have some sort of concurrency/infinite loop
issues remaining. Are their known problems with putting UDFs in the
worksheet_change event?
"Jim Thomlinson" wrote in
message ...
Make your first line in the UDF

Application.Volatile

This will for the UDF to recalucate with each calculation of the sheet.
--
HTH...

Jim Thomlinson


"Mike" wrote:

Hi, if I manually or programmatically paste data into 2+ cells with user
defined functions only the first cell's function is executed. Is there
some
sort of equivalent to Calculate or some other way to force this? I have
found that if I manually cut the formula from the cell and paste it back
into the same cell, it executes, but that seems hacky and burdensome.

Thanks,
Mike






Peter

calculate now for user defined functions?
 
Hi,

I faced the same problem that deleting / pasting cell in Excel will fire the
Calculate event to execute again & again (infinite loop)...

Is it a known bug of UDF and Calculate event?

Thanks,
Peter

"me" wrote:

Thank you Jim. I tried that, but have some sort of concurrency/infinite loop
issues remaining. Are their known problems with putting UDFs in the
worksheet_change event?
"Jim Thomlinson" wrote in
message ...
Make your first line in the UDF

Application.Volatile

This will for the UDF to recalucate with each calculation of the sheet.
--
HTH...

Jim Thomlinson


"Mike" wrote:

Hi, if I manually or programmatically paste data into 2+ cells with user
defined functions only the first cell's function is executed. Is there
some
sort of equivalent to Calculate or some other way to force this? I have
found that if I manually cut the formula from the cell and paste it back
into the same cell, it executes, but that seems hacky and burdensome.

Thanks,
Mike








All times are GMT +1. The time now is 07:20 PM.

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