Using the contents of a cell in a cell reference

  • Thread starter Thread starter Thomas Flake
  • Start date Start date
T

Thomas Flake

In order to save time it would be useful to create a cell reference that
contained a variable. Does anyone know if this can be done and if so what
the notation might be?

The idea is this:

If I normally want to reference a data set from D5:D21 but sometime the
length of the data changes an it might be D5:D35 it would be helpful if I
could enter 21 or 35 in cell A1 and then reference the data set as D5:D(A1)
that way anytime I change the value in A1 my data set would be updated.

Thanks in advance

Tom
 
I think you want to use =indirect().

A simple example:

=SUM(INDIRECT("D5:D"&A1))
 
Back
Top