I want to create an array/ a list of cells (i don't know the exactly terminology), in rows or columns form, covering the range between 2 numbers
Fox example, I have 2 cells,
A1
= 3
; B1
= 10
I want to generate in a dynamic way, an array of cells that cover the range between A1
and B1
:
C1
= 3
C2
= 4
C3
= 5
…
C8
= 10
Best Answer
I would use a script for this. Something like this:
Select the cell where you want the first number to appear and run the script.
If you really want to use a function you could use this:
Set the first cell (
C1
in this case) to=A1
and paste the formula above inC2
and drag the corner down so that it's copied down.The downside with the formula, especially if you have a big range, is that you have to drag it to cover the same amount of cells that is in the range. If you use the script ou just have to select the first cell and run it. An advantage with the formula, though, is that the cells update automatically. (You could modify the script to run automatically when you edit the range cells, though, if that is something you want.)