5

I am using =rand() to generate a lot of random number. Everytime, I make some changes in the file, it will generate a whole new set of numbers. I want to keep the numbers random, but keep them fixed everytime. How to do that?

1 Answers1

3

Rand() is a volatile funciton. This means that it is recalculated every time Excel recalculates. Pretty much you have three options (2 mentioned in the comments):

  • set the calculations to manual (this is dangerous, you may forget it later);
  • remove the formula and save the values (this will work quite ok);
  • make a User Defined Function, which does exactly the same and is non-volatile:

Public Function RandNotUpdate() As Double
    RandNotUpdate = Rnd
End Function
Vityata
  • 42,633
  • 8
  • 55
  • 100