I have 2 numbers in 2 columns. I am trying to get ranges of numbers between those two numbers.

For example, when I have 1330 in 1st column and 1335 in second column, I want this result:

```
1330
1331
1332
1333
1334
1335

```

My spreadsheet: [Range of number between two number google sheet](https://docs.google.com/spreadsheets/d/1xxClDPq96Ghg09gfzz4RSCQDeShVa9EgRwLkwReMMNY/edit?usp=sharing).
['https://webapps.stackexchange.com/questions/160714', 'https://webapps.stackexchange.com', 'https://webapps.stackexchange.com/users/276710/']
I wouldn't recommend placing your formula *below* your raw data columns, because it would prevent your raw data in Columns A and B from expanding downward. Instead place your results off to the right somewhere (or in another sheet).

That said, based on the data in your sample spreadsheet, try first deleting everything from A7 down. Then place the following single formula in, say, cell D3:

`=ArrayFormula(QUERY(FLATTEN(IF(A3:A="",,IF(A3:A+SEQUENCE(1,10,0)>IF(B3:B="",A3:A,B3:B),,A3:A+SEQUENCE(1,10,0)))),"Select * WHERE Col1 Is Not Null"))`

This will produce all results.

If your range between the number in Col-A and the number in Col-B will ever exceed 10, just change the two instances of `10` in the formula to a number that exceeds the max range that may occur between the two columns.

If you want to use this formula in a separate sheet of the spreadsheet, just be sure to prefix `Sheet1!` to the front of each range shown in the formula (e.g., `Sheet1!A3:A`, etc.).
You can get the sequence `1330 1331 1332 1333 1334 1335` like this:

`=iferror( sequence(1, B3 - A3 + 1, A3), A3 )`

Put that in cell `D3` and copy the cell down to `D3:D6`. The use this formula to get the final list:

`=query( flatten(D3:I6), "where Col1 is not null", 0 )`