Google Sheets – Print Incremental Numbers Using ArrayFormula

google sheetsgoogle-sheets-arrayformulagoogle-sheets-dates

Cell A1 holds a numerical value (e.g. 10), and I'd like to output the list of numbers from 1 to that number in B1:

enter image description here

What's the formula I need for B1? It seems trivial, and I know it probably requires ARRAYFORMULA but I just don't know where to go from there.

Best Answer

It is as simple as using the following sequence formula

=SEQUENCE(A1)

google sheets sequential/incremental numbers

Or you even could have something like this:

=SEQUENCE(A2,1,A4,A6)

enter image description here

You could even use the SEQUENCE function for dates

=SEQUENCE(A2,1,A4,A6)

creating an array of dates