Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Random Number Generation | Basic Functions
Google Spreadsheets
course content

Зміст курсу

Google Spreadsheets

Google Spreadsheets

1. Introduction to Google Sheets
2. Formatting of Cells and Ranges
3. Advanced Formatting of Cells
4. Sorting, Filtering and Cleaning Data
5. Creating Charts
6. Basic Functions
7. Logical Functions
8. Collaboration and Security

book
Random Number Generation

The RAND function generates a random number with decimal places in the range from 0 to 1 (exclusive). It is used for random data selection, generating random coefficients in modeling, and analysis. For example, when creating samples for statistics or simulating probabilistic processes.

Syntax and Examples

RAND()

  • The function takes no arguments.
FormulaResultComment
RAND()0.07156The RAND() function generates a random number in the range from 0 to 1.
RAND() * 9 + 11.94145This expression scales the random number so that it is in the range from 1 to 10. Multiplying by 9 increases the range, and adding 1 shifts it.

Generating Random Numbers in a Range

The RANDBETWEEN function generates a random integer within the specified range, including the boundaries. It is used for generating random dates, numerical identifiers, or creating test data. It can also be used for selecting random contest participants, random questions in surveys, and more.

Syntax and Examples

RANDBETWEEN(low, high)

  • low - The lower boundary of the random range;
  • high - The upper boundary of the random range.
FormulaResultComment
RANDBETWEEN(1, 100)77This function returns a random integer in the range from 1 to 100. In this case, the result is 77.
RANDBETWEEN(-1, 1.5)1Here, the function generates a random integer in the range from -1 to 1.5. Since the result must be an integer, 1 is returned.
RANDBETWEEN(DATE(2020, 1, 1), DATE(2025, 12, 31))3/5/2021This function returns a random date in the range from January 1, 2020, to December 31, 2025. The generated date is March 5, 2021.
INDEX({"Red", "Green", "Blue", "Yellow", "Black"}, RANDBETWEEN(1, 5))RedThis formula selects a random color from the list: "Red", "Green", "Blue", "Yellow", "Black". The randomly generated value points to "Red".

Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 6. Розділ 7
We're sorry to hear that something went wrong. What happened?
some-alt