Excel RAND Function. The Excel RAND function returns a random number between 0 and 1. ... To get a random number that doesn't change when the worksheet is calculated, enter =RAND() in the formulas bar and then press F9 to convert the formula into its result.