Sum of an array

E

edwin.villamayor

Is there anyway to sum a range of values given a specific number of
cells you choose to sum. For example you have a range from A1:F1,
G1=number of cells you want to sum from left to right, and H1 is the
total. So if G1=3, then H1=sum(A1:C1) or 16. If G1=5, then
H1=sum(A1:E1) or 20.


A B C D E F G H

1 3 5 8 3 1 7 Var Sum

Thanks in advance.
 
R

RagDyer

You're welcome, and appreciate the feed-back.
--
Regards,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
Non-volatile approach:

=SUM(A1:INDEX(A1:F1,G1))

Perfect! Thanks a bunch!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top