您请求访问的页面目前没有您的语言版本。您可以从页面底部选择其他语言,或使用 Google Chrome 的内置翻译功能将网页内容即时翻译成您选择的语言。

RANDBETWEEN()

Random integer from range

Returns a randomly-chosen integer (Number value) that falls within the specified lower and upper bounds.

Sample usage

RANDBETWEEN(1, 10) returns a random whole number between 1 and 10.

(RANDBETWEEN(0, 1) = 1) returns a random Yes/No value.

(RANDBETWEEN(0, 100) / 100.0) returns a random Decimal value between 0.00 and 1.00 with two digits after the decimal point.

INDEX({"Heads", "Tails"}, RANDBETWEEN(1, 2)) returns Heads or Tails as a Text value.  See also: INDEX()

MID("ABCDE", RANDBETWEEN(1, 5), 1) returns a random letter from A to E as a Text value. See also: MID()

INDEX(Students[Name], RANDBETWEEN(1, COUNT(Students[Name]))) returns a randomly-chosen student's name. See also: COUNT()

ORDERBY(Cards[Card ID], RANDBETWEEN(1, 52)) returns the list of Card ID column values in a random order. See also: ORDERBY()

Syntax

RANDBETWEEN(lower-bound, upper-bound)

  • lower-bound - Any numeric type that specifies the lowest random value that may be returned.
  • upper-bound - Any numeric type that specifies the highest random value that may be returned.

See also

UNIQUEID()

Was this helpful?

How can we improve it?
true
Search
Clear search
Close search
Main menu
3111492949662267672
true
Search Help Center
false
true
true
true
false
false
false
false
false
⌂ 换网址