RANGE

Creates an array of numbers with values ranging from the start number to the end number, by repetitively adding the step value to calculate values.

📘

Range results can only result in arrays of up to 1,000 entries; if the start, end and step values would produce an array with more than 1,000 entries, the function will return an error.

Syntax

=RANGE(start, end, step)

=RANGE(start, end)

Arguments

ArgumentTypeDescription
startNumberThe starting value for the range
endNumberThe ending value for the range
stepNumber(Optional) The step to use to calculate the subsequent numbers for the range, defaults to 1

Examples

=RANGE(1, 10)[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
Creates an array of numbers from 1 to 10, with a step of 1 (using the default step)

=RANGE(1, 10, 2)[1, 3, 5, 7, 9]
Creates an array of numbers from 1 to 10, with a step of 2

=RANGE(0, -5, -1)[0, -1, -2, -3, -5]
Creates a range of numbers from 0 to -10, with a step of -1

=RANGE(0, -10, 1)#ERROR!
Attempts to create a range from 0 to -10 with a step of 1, but errors because it would not reach -10 by adding 1