# Formula that turns a number into itself and all previous numbers/integers???

Topic Labels: Data Formulas
479 2
cancel
Showing results for
Did you mean:
4 - Data Explorer

How do I make a formula that turns a number into itself and all the previous numbers?

I.E. the number in the field is 8

The formula should turn the field into:

1, 2, 3, 4, 5, 6, 7, 8

2 Replies 2
18 - Pluto

Hmm, I think you might have to hardcode it I'm afraid:

I only made it work up to 9, and as you can see for "10" it shows the starting number as "2"

And the formula is:

``````IF(
AND(
Number,
Number - 8 >= 1
),
Number - 8 & ","
) &
IF(
AND(
Number,
Number - 7 >= 1
),
Number - 7 & ","
) &
IF(
AND(
Number,
Number - 6 >= 1
),
Number - 6 & ","
) &
IF(
AND(
Number,
Number - 5 >= 1
),
Number - 5 & ","
) &
IF(
AND(
Number,
Number - 4 >= 1
),
Number - 4 & ","
) &

IF(
AND(
Number,
Number - 3 >= 1
),
Number - 3 & ","
) &
IF(
AND(
Number,
Number - 2 >= 1
),
Number - 2 & ","
) &

IF(
AND(
Number,
Number - 1 >= 1
),
Number - 1 & ","
) &
Number``````

Community Manager

or use a script that triggers when the source field is changed.