To minimize recalculations, you can select the Excel cell that references StaticRand, press F2, then press Enter.
In effect, you are "re-editing" the cell. But since you simply press Enter, nothing changes. Nevertheless, Excel recalculates the cell (it calls the function) and any directly and indirectly dependent cells.
PS.... To ensure a random sequence of numbers, you should call Randomize at least once (and preferrably only once) some time after opening the Excel file.
One way is to create a Workbook_Open event macro. In VBA, press ctrl+R to open the Project Explorer pane on the left, double-click on ThisWorkbook, then copy the following and paste into VBA:
Alternatively, change your VBA function as follows:
Technically, the two are not the same. If VBA is reset (there are several ways that happens), Randomize will be called again. But that should be infrequently and "randomly" enough that it should not adversely affect the sequence of random numbers.
Bookmarks