ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   how do I do a variable length array based on the value in a cell (https://www.excelbanter.com/excel-discussion-misc-queries/67240-how-do-i-do-variable-length-array-based-value-cell.html)

Mark Pranger

how do I do a variable length array based on the value in a cell
 
I want to create a cell range that will be based on the value of a cell so
that i can change the value of the cell and the range will lengthened or
shortened. Say I want to have the range start at cell b1 and go down the
column for 10 cells. then I decide to change it to 15 cells and then 40
cells. But I don't want to have to rewrite the formula each time. Any
suggestions?


Max

how do I do a variable length array based on the value in a cell
 
Think OFFSET could be used,
with the height param pointing to a cell.

For eg, with the height param number in A1, say: 5
=OFFSET($B$1,,,A1)
would return the range B1:B5

If A1 contains 10, then the range B1:B10 is returned
And so on
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Mark Pranger" <Mark wrote in message
...
I want to create a cell range that will be based on the value of a cell so
that i can change the value of the cell and the range will lengthened or
shortened. Say I want to have the range start at cell b1 and go down the
column for 10 cells. then I decide to change it to 15 cells and then 40
cells. But I don't want to have to rewrite the formula each time. Any
suggestions?





All times are GMT +1. The time now is 10:27 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com