How to have a stop value to the sequence generated by SEQUENCE() function in Google Sheets

Viewed 35

I was trying to generate a descending sequence in Google Sheets.
But I want that sequence to be dynamically based on another cell's value. So this sequence should be going from that number and stop when it reaches 0.
I was able to set the step value as -1 to get the descending sequence but it is not stopping at 0.
Any suggestions?

1 Answers

Use the following

=SEQUENCE(A1+1,1,A1,-1)

To omit the 0 values try:

=SEQUENCE(A1,1,A1,-1)

enter image description here

Related