ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how to create volatility (https://www.excelbanter.com/excel-programming/358247-how-create-volatility.html)

sybmathics

how to create volatility
 
Hi,

I creaed a function that chooses a random alphabetical character (from A to
Z), comparable to the built-in Rand function.
My function neither doesn't take any arguments.
One of the sympathetic uses of Rand or Randbetween is that it recalculates
automatically when pressing F9 or when pressing Enter or OK.
I would like to have that same kind of volatility to my RandCharacter
function.

Is this possible?

Anybody got any ideas?


Any help is greatly appreciated.


Sybolt



Jim Thomlinson

how to create volatility
 
At the top of the function add the line

Application.volatile
--
HTH...

Jim Thomlinson


"sybmathics" wrote:

Hi,

I creaed a function that chooses a random alphabetical character (from A to
Z), comparable to the built-in Rand function.
My function neither doesn't take any arguments.
One of the sympathetic uses of Rand or Randbetween is that it recalculates
automatically when pressing F9 or when pressing Enter or OK.
I would like to have that same kind of volatility to my RandCharacter
function.

Is this possible?

Anybody got any ideas?


Any help is greatly appreciated.


Sybolt




sybmathics

how to create volatility
 
Yes Jim.

It works.

And I also managed to call for another used-defined function in my new
user-defined function.
Now it's Volatility all round.

This really helps in creating random examples or excersizes.

Great.






Jim Thomlinson

how to create volatility
 
With great power comes great responsibility. Volatile functions are a drain
on resources so use them judiciously...
--
HTH...

Jim Thomlinson


"sybmathics" wrote:

Yes Jim.

It works.

And I also managed to call for another used-defined function in my new
user-defined function.
Now it's Volatility all round.

This really helps in creating random examples or excersizes.

Great.








All times are GMT +1. The time now is 01:45 AM.

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