SOLVED

Excel

%3CLINGO-SUB%20id%3D%22lingo-sub-3449484%22%20slang%3D%22en-US%22%3EExcel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3449484%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20a%20row%20with%20values%20and%20want%20to%20return%20a%20sum%20value%20from%20a%20value%20in%20another%20cell.%3C%2FP%3E%3CP%3EThe%20row%20contains%20financial%20values%20by%20week%20and%20I%20want%20to%20input%20a%20number%20of%20weeks%20to%20then%20sum.%3C%2FP%3E%3CP%3EPlease%20advise.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3449484%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3449777%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3449777%22%20slang%3D%22en-US%22%3Elet%20say%20the%20row%20of%20data%20is%20A1%3AAZ1%20and%20you%20have%20want%20a%20sum%20in%20cell%20BA1%20based%20on%20the%20number%20of%20weeks%20entered%20in%20BB1%3A%3CBR%20%2F%3E%3DSUM(A1%3AINDEX(A1%3AAZ1%2CBB1))%3CBR%20%2F%3Eor%3CBR%20%2F%3E%3DSUM(OFFSET(A1%2C0%2C0%2C1%2CBB1)%3CBR%20%2F%3Ebut%20are%20you%20doing%20that%20because%20you%20want%20it%20to%20only%20sum%20up%20to%20today%2Fthis%20week%3F%20assuming%20you%20have%20a%20header%20row%20of%20dates%20you%20could%20automatically%20have%20it%20find%20that%20column.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3449805%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3449805%22%20slang%3D%22en-US%22%3EHi%20mtarler%2C%3CBR%20%2F%3E%3CBR%20%2F%3EBrilliant%20-%20thank%20you%20so%20much.%3C%2FLINGO-BODY%3E
New 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.