Dynamic data ranges

I

Inov8desin

I have a constantly changing data set and want to use the range in formulas.
For example, one week I will use sheet2!J4:J20, the next week would be
J4:J50, then J4:J10, etc.

The beginning cell is always the same and I can find the last cell using a
counta function on the list.

I have tried the address function and can get the cell returned, but cannot
figure out how to use the information in another function, such as vlookup,
sum, etc.

HELP!!!
 
J

John C

=OFFSET(Sheet2!$J$4,0,0,counta,1)
Understand, that by itself will error, (unless you enter it as an array),
but otherwise, you stick that into your formula, and it will define itself as
a 1 column wide array starting at Sheet2!$J$4 and going down how ever many
rows is tabulated by your said COUNTA formula
Also note: This is a volatile function, which means it 'constantly
calculates'. If you open this file and then close it, and do nothing, it will
ask if you want to save changes.
 
I

Inov8desin

Thanks John!

Works like a charm.

John C said:
=OFFSET(Sheet2!$J$4,0,0,counta,1)
Understand, that by itself will error, (unless you enter it as an array),
but otherwise, you stick that into your formula, and it will define itself as
a 1 column wide array starting at Sheet2!$J$4 and going down how ever many
rows is tabulated by your said COUNTA formula
Also note: This is a volatile function, which means it 'constantly
calculates'. If you open this file and then close it, and do nothing, it will
ask if you want to save changes.
 
T

T. Valko

As long as the range has contiguous entries, here's a non-volatile approach:

=Sheet2!J4:INDEX(Sheet2!J4:J100,COUNTA(Sheet2!J4:J100))

Adjust the end of range as needed. For example, if you will never need to go
beyond J100 then use J100. If you will never need to go beyond J50 then use
J50.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top