No votes yet

Excel random number generator

An Excel random number generator is a formula that puts a random value in a cell when the sheet calculates. RAND returns a decimal at least 0 and less than 1. RANDBETWEEN returns a whole number in the range you name.

Time By Online Alarm Clock

How it works

You type a formula, not a button from a website. RAND() takes no arguments. It spills a decimal in the half-open interval from 0 up to but not including 1. RANDBETWEEN(bottom, top) takes two integers and returns a whole number from the lower argument through the upper argument, including both ends. Excel recalculates these functions when the workbook calculates. A new calculation is a new draw. That is why a number you liked can vanish when you type in another cell.

People also search excel random numbers generator when they want several cells, not one. The method is the same formula, filled down or across. Each cell is its own draw unless you copy a frozen value. A random generator excel request is the same job with the words in another order: the generator lives in Excel, and the output is a random number or a block of them.

These functions are not a lottery machine with an audit log. They are worksheet functions. They are enough to shuffle a practice list, to fill dummy quantities, to pick a row index for a drill. They are the wrong tool for a prize draw you must defend, or for a secret key. If you needed a record, copy the values out to a place that will not recalculate.

One cell, a column, and a range you meant

For a decimal between two ends a and b, the usual shape is a + RAND()*(b-a). That uses RAND’s 0-to-almost-1 interval and scales it. For integers, RANDBETWEEN is the direct tool. An older integer pattern with RAND also exists: INT(RAND()*(top-bottom+1))+bottom. If you use that pattern, keep the +1. Dropping it is how the top integer never appears.

Decide decimal or integer. Write the ends. For RANDBETWEEN, both ends can appear. Put the formula in one cell. Confirm it looks like the kind you meant. Fill down or across if you needed a block. Paste values if the block must stop moving.

Newer Excel builds also offer RANDARRAY, which can spill many values at once, with optional minimum, maximum, and an integer switch. If your build does not recognize RANDARRAY, you are not in a build that has it. Use RAND or RANDBETWEEN and fill. Do not invent a function name your sheet rejects.

A column of random numbers is still volatile. Sort, filter, or insert a row, and the sheet may calculate again. The order you were looking at can change under you. If the column was a shuffle you already showed a class, it is no longer that shuffle after the next calculation. Freeze first, then sort a copy.

Freeze the draw or it will wander

Copy the cells and paste values onto themselves, or onto a new sheet. After that, Excel stores numbers, not formulas. The draw is finished. You can still use formulas beside the frozen block. You cannot ask the frozen block to stay both live and stable. Those are opposite requests.

Recalculation is not a bug. It is what volatile functions do. F9, editing a cell, opening the file depending on settings: any of these can redraw. If a colleague opens your workbook and the demo numbers have moved, the formulas did their job. Send values when the point of the file was a fixed sample.

If you needed that particular 7 to stay, paste values. Excel is not sentimental about last time’s draw. Do not hide a RAND inside a sheet you print as an official assignment key unless you froze it. Students should not receive different keys because someone typed in a header. Do not use worksheet random as a password. A cell that recalculates is a poor vault, and the function is not built as a cryptographic source.

Questions and answers

Why does the number change when I edit another cell?
RAND and RANDBETWEEN are volatile. A workbook calculation is a new draw. Paste values to freeze them.
Does RANDBETWEEN include the top of the range?
Yes. Both the bottom and the top arguments are allowed results.
How do I fill many random numbers at once?
Fill the formula down, or use RANDARRAY if your Excel build has it. Freeze the block if it must not redraw.

Related guides

Tools

Address random generator

An address random generator builds a fake street line so you do not invent one by hand. Searches for random address generator, address generator random, and a New York variant still want a sample, not

Tools

Alphabet random generator

An alphabet random generator shuffles the letters of an alphabet into a new order. For English that is a permutation of A through Z, each letter once.

Tools

Animal generator random

An animal generator random pick is one animal name drawn from the tool’s list. Each click returns one animal from that list, not a living creature and not a complete catalog of Earth.

All guides

All pages