3

Is it possible to generate an array of numbers between two provided numbers eg =sequence(1,10) results in {1,2,3,4,5,6,7,8,9,10}

My end goals is to generate a list of days between two dates, but have tried to generalise the question.

I thought about using =TREND, but I couldn't figure it out.

4
=arrayformula(row(1:10))

returns a list of numbers 1 through 10, as a column. Can be made a row with transpose.

A dynamic version, where the upper bound is taken from cell C1:

=arrayformula(row(indirect("1:" & C1)))
  • Thanks, That works well, I thought from this I'd be able to get a series of dates dynamically, However, I've now got stuck on replacing the 10 with days(today(), $B$1) – jamesmstone Feb 9 '18 at 3:05
  • 1
    See the edit. Reference C1 could be any formula. – user135384 Feb 9 '18 at 3:42
  • champion, cheers – jamesmstone Feb 9 '18 at 3:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.