Generate a list of consecutive numbers , between two numbers

Hello,

Is there an easy way to generate a list of all numbers between two numbers , by giving only the first and the last number , via usersettings?

In an app, the user should imput
Field 1 : 4
Field 2: 7
Result : (4,5,6,7) (list)

Thank you very much

Solved Solved
0 3 1,018
1 ACCEPTED SOLUTION

Steve
Platinum 5
Platinum 5

Itโ€™s possible with a relatively small number of numbers within a limited range:

(
  TOP(
    list-of-possible-numbers,
    last-number
  )
  - TOP(
    list-of-possible-numbers,
    (first-number - 1)
  )
)

Using your example values:

(
  TOP(
    LIST(1, 2, 3, 4, 5, 6, 7, 8, 9),
    7
  )
  - TOP(
    LIST(1, 2, 3, 4, 5, 6, 7, 8, 9),
    (4 - 1)
  )
)

Note that list-of-possible-values must be in order and contain no duplicate values.

View solution in original post

3 REPLIES 3
Top Labels in this Space