Returns a deterministic random number in [0, 1) based on a seed and optional position indices. Drop-in replacement for RAND() that is reproducible: same inputs always produce the same output.
seed — The trial seed (number or string). Typically a cell reference, e.g. Parameters!$A$1.index1, index2, ... — Optional position indices (e.g. ROW(), COLUMN()). Use these to generate unique values per cell from a single seed.A float in [0, 1). Same inputs always produce the same output.
=RANDSEED(42) — single deterministic value=RANDSEED($A$1, ROW()) — unique per row, reproducible per seed=RANDSEED($A$1, ROW(), COLUMN()) — unique per cell in a 2D rangeWrap the output in native Sheets distribution functions to shape it into any distribution:
=NORMINV(RANDSEED($A$1, ROW()), mean, stdev) — normal distribution=LOGNORM.INV(RANDSEED($A$1, ROW()), mu, sigma) — lognormal=BETA.INV(RANDSEED($A$1, ROW()), alpha, beta) — beta distributionReturns a 2D array of deterministic random numbers in [0, 1). Single-call alternative to filling a range with individual RANDSEED formulas. Place in one cell and the result spills across the specified rows and columns.
seed — The trial seed (number or string).rows — Number of rows to generate.cols — Number of columns (default 1).startRow — Starting row index (default 1). Values match what ROW() would return for row 1.startCol — Starting column index (default 1). Values match what COLUMN() would return for column A.A 2D array of floats in [0, 1). Each cell's value is identical to what RANDSEED(seed, startRow + r, startCol + c) would produce.
=RANDSEEDARRAY($A$1, 100) — 100 random values in a column=RANDSEEDARRAY($A$1, 50, 3) — 50 rows by 3 columns=RANDSEEDARRAY($A$1, 10, 5, 1, 1) — explicit start indicesEvery output is fully determined by its inputs. Change the seed to get a different trial; keep it the same to reproduce results exactly. This makes it possible to compare model runs, share results, and debug edge cases.
Each cell's value depends only on the seed and its indices — not on evaluation order or neighboring cells. Insert or delete rows without affecting other values.