Hlookup a week number and sum from that point until week 52

Katsimps

New Member
Joined
Jan 24, 2018
Messages
11
Hi, I'm struggling to find the right formula to add up the sales from a certain week number (variable by row) until week 52

Assume sum of weeks = D2, I've manually summed the weeks from and to (in this example up to week 10), however I have over 600 rows of data that differ by row.

I hope I've requested correctly and apolgoies if not.

12345678910
Completion DateWeek Number FromToSum of WeeksStore Name06-Jan13-Jan20-Jan27-Jan03-Feb10-Feb17-Feb24-Feb03-Mar10-Mar
13/01/20182101,684 Store A7886762102193158952480157
10/03/20181010497 Store B332383401299152355224234156497
03/02/20185101,853 Store C645969356330258398164227476
18/02/2018810812 Store D17011514216214593124364176272

<colgroup><col><col span="3"><col><col span="10"></colgroup><tbody>
</tbody>
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Hi.

Welcome to the forum.

Try to put this in to Cell P3 then drag it down

=IF($C3=$B3,OFFSET($F3,0,C$3-1),SUM(OFFSET($F3,0,$B3-1,1,($C3-$B3)+1)))

If it works you can add it in to Sum of Weeks column.
 
Upvote 0
Hi.

Welcome to the forum.

Try to put this in to Cell P3 then drag it down

=IF($C3=$B3,OFFSET($F3,0,C$3-1),SUM(OFFSET($F3,0,$B3-1,1,($C3-$B3)+1)))

If it works you can add it in to Sum of Weeks column.



Thank you so much, this works!
 
Upvote 0

Forum statistics

Threads
1,215,103
Messages
6,123,108
Members
449,096
Latest member
provoking

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top