View Single Post
  #4   Report Post  
David McRitchie
 
Posts: n/a
Default

Sorry I had not tested INDIRECT

=SUM(INDIRECT(L18 & ":" & M18)) where L18: A3 and M18: A300

=SUM(INDIRECT(TEXT(L17,"@"))) where L17: A3:A300

must be a shorter solution using INDIRECT

---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Branko" wrote in message ...
What I want is to have 3 and 300 (in my example) in another cell as variable
so by changing those inputs I would change the desired range.

"David McRitchie" wrote:


You could use a defined name for the range, or if you really must
you could use INDIRECT
=SUM(INDIRECT($B$3))

but possibly you are trying to compensate for a formula that
might better be written as
=SUM(A$3, OFFSET(A301,-1,0))
if you are concerned about inserting or deleting rows
above row 301 and below row 3.

http://www.mvps.org/dmcritchie/excel/offset.htm
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Branko" wrote in message ...

If I have in a cell reference
=SUM(A3:A300)
how to have 3 and 300 referenced to another cell so that I can change range
without changing formula?