Sum offset match

nicky20

New Member
Joined
Oct 29, 2013
Messages
4
Hi,

I have a worksheet and in that sheet cell A1 says the month, B1 says the week ending date and C1 tells me how many weeks there are in a month.

Row 2 I have the week ending dates for the year
Row 3 is the data

At the end of the dates in row two I have this formula:

=SUM(OFFSET(A3,0,0,1,MATCH(B1,A2:W2)))

Which sums all the range up until a specified date, however, I need the formula to only add a number of cells before this date - this number is variable as it changes each month.depending on what is in cell C1. I tried to add this into my formula but to no avail, can some provide me with the correct formula and explain how you got to it?

Many thanks!

Nicky
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Hi Nicky,

Try this:

Code:
=SUM(OFFSET(A3,0,MATCH(B1,$A$2:$W$2,0)-1,1,-C1))

Thanks.

Simon

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,214,965
Messages
6,122,500
Members
449,090
Latest member
RandomExceller01

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