View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rick Rothstein \(MVP - VB\) Rick Rothstein \(MVP - VB\) is offline
external usenet poster
 
Posts: 2,202
Default Variable Cell Range Reference

How do I refer to a range of values when one component is a variable? For
instance, lets say I want the MAX value of the cells from cell A5 to
A(6+x)
where x is a variable ... if x=4 then I would be finding the MAX value in
the
cells from A5 to A10. How do I structure this formula in Excel?


This should work...

=MAX(INDIRECT("A5:A"&(6+X1)))

where I stored your "variable" in cell X1.

Rick