Forum Discussion
TrevB
Mar 17, 2022Copper Contributor
Automatically changing search or summing ranges
 Hi, I am trying to create a formula where you enter a week number, in a separate cell and then sum a given number of weeks going forwards from that point, from another separate cell. The idea is that...
- Mar 17, 2022Wow, thank you so much!! I've been fighting this one for hours and just going round in circles
TrevB
Mar 17, 2022Copper Contributor
Thanks Peter, that is beyond my knowledge base, i tried XLOOKUP, but failed miserably when i tried to change the summed range
PeterBartholomew1
Mar 17, 2022Silver Contributor
Firstly, are you using Excel 365 (or 2021)?
Then, do you wish to apply the formula to more than a single row?
- TrevBMar 17, 2022Copper ContributorHi Peter,
 I'm on Office 365, and I must admit i have just adjusted the ranges and used Riny's formula which has worked perfectly for what i need. Thank you for the attached example, i will have a study. thanks again for your time.- Riny_van_EekelenMar 17, 2022Platinum ContributorTrevB SUMIFS had slipped my mind (thx Peter)!! I believe you find this formula easier to work with than my original INDEX/MATCH/OFFSET monster. =SUMIFS(P6:AF6,P$2:AF$2,">="&$B$2,P$2:AF$2,"<="&$B$2+$F$2)