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.
 

Zack Barresse

Super Moderator
Staff member
Joined
Mar 16, 2011
Messages
112
Reaction score
0
Points
0
Location
Oregon, United States
Excel Version(s)
365, Online, iOS, iOS for iPad
Hi there,

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

HTH
 

Pecoflyer

Admin Alumnus
Joined
Oct 13, 2011
Messages
1,774
Reaction score
0
Points
36
Location
Brussels Belgium
Excel Version(s)
2010 on Xubuntu - O365
If you want to avoid the volatile INDIRECT also try
Code:
=SUM(INDEX($R$1:$R$1000,A1):INDEX($$R1:$R$1000,A2))
 
Top