Making Row Numbers in Range in a Formula Variable

  • Thread starter Thread starter marvin stokes
  • Start date Start date
M

marvin stokes

I would like to make the row numbers used in a range in a
formula variable vs. hardcoded. Is this possible?

For example: rather than hardcoding = sum(a$12:a$44), I
would like to do something like = sum
(a$variable1:a$variable2) where variable1 and variable2
are cell references which contain numeric values which can
be easily changed.
 
Marvin,

Take a look at the INDIRECT function. For example, if your
beginning and ending row numbers are in A1 and B1, you can use a
formula like

=SUM(INDIRECT("A"&A1&":A"&B1))


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Back
Top