RAND Function

papal singh

New Member
Joined
May 13, 2014
Messages
2
so I've got this code which uses the RAND function and it keeps on re calculating every time, is there any way I can stop this or use some other similar function?
 

Slizer6893

Active Member
Joined
Oct 25, 2013
Messages
271
You have to be more specific or you won't get any help. What is the code? What function is it serving?
 

ShawnPCooke

Board Regular
Joined
May 14, 2007
Messages
151
The RAND function will always generate a new random number every time the workbook calculates.

I'm not sure what your needs are, but there are two ways that this could go.

1) Use the RAND function to generate a random number. Copy > Paste Special as Values to remove the formula. Use a reference to that result in your formula.

This methodology has the benefit of remaining static under workbook calculation. If you ever needed a new random number, you could use the RAND function again in that same cell, to which your larger formula has a reference.

2) Disable auto calculation.

Because no calculations are being performed, the RAND would not keep changing. If you ever wanted to calculate your workbook, you could calculate manually using F9. However, this would generate a new random number as well as calculating the rest of the formulas.

If neither of these work for you, then we would need more information about what you're trying to accomplish.
 

Forum statistics

Threads
1,085,992
Messages
5,387,141
Members
402,045
Latest member
Hidalgo

Some videos you may like

This Week's Hot Topics

Top