How to sum a variable part of a range

witekmar

New member
Joined
Aug 3, 2013
Messages
1
Reaction score
0
Points
0
I would like to compute the sum of a variable contiguous part of the range R(1:1000) where say cells A1 and A2 contain the integers indicating the first and the last cell of the selected part respectively. For instant is A1 contains 7 and A2 contains 120 how can I compute SUM(R7:R120)? Thanks for the help.
 
Hi there,

You want he INDIRECT() function, like this...
Code:
=SUM(INDIRECT("R"&A1&":R"&A2))

HTH
 
If you want to avoid the volatile INDIRECT also try
Code:
=SUM(INDEX($R$1:$R$1000,A1):INDEX($$R1:$R$1000,A2))
 
Back
Top