SOLVED

Excel

Copper Contributor

I have a row with values and want to return a sum value from a value in another cell.

The row contains financial values by week and I want to input a number of weeks to then sum.

Please advise. 

2 Replies
best response confirmed by Hans Vogelaar (MVP)
Solution
let say the row of data is A1:AZ1 and you have want a sum in cell BA1 based on the number of weeks entered in BB1:
=SUM(A1:INDEX(A1:AZ1,BB1))
or
=SUM(OFFSET(A1,0,0,1,BB1)
but are you doing that because you want it to only sum up to today/this week? assuming you have a header row of dates you could automatically have it find that column.
Hi mtarler,

Brilliant - thank you so much.
1 best response

Accepted Solutions
best response confirmed by Hans Vogelaar (MVP)
Solution
let say the row of data is A1:AZ1 and you have want a sum in cell BA1 based on the number of weeks entered in BB1:
=SUM(A1:INDEX(A1:AZ1,BB1))
or
=SUM(OFFSET(A1,0,0,1,BB1)
but are you doing that because you want it to only sum up to today/this week? assuming you have a header row of dates you could automatically have it find that column.

View solution in original post