Sum cells only if 6 weeks before todays date

JamesMook

New Member
Joined
Feb 10, 2015
Messages
44
I'm looking for a formula that will sum together cells in a column but only if the data comes from 6 weeks before todays date.

The column with data would be B1:B999
The column with dates would be A1:A999

I'm presuming it would be something like =SUMIF(B1:B999,"<"&TODAY(),A1:A999) however this doesn't specify 6 weeks only. Any one have any ideas?

Thanks
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
When you say "only if the data comes from 6 weeks before todays date."
Do you mean data for the LAST 6 weeks?
 
Upvote 0
Would this get you what you are looking for...?
=SUMIF(A1:A999,">"&(TODAY()-42),B1:B999)

I'll give this a go and let you know but definately looks like it should work. Don't know how i didn't work that out, must be that friday feeling. thanks
 
Upvote 0
That formula works great thanks. I'm not sure if oi need to start a new thread for this but as it was linked i thought i'd post here. I now want to combine these2 formula. Happy to start a new thread if required.

=SUMIFS(RAW!J:J,RAW!I:I,"James Pite",RAW!B:B,"2015") (i want to add the within 6 weeks part of the below formula)

=SUMIFS(RAW!K:K,RAW!A:A,">="&B2,RAW!A:A,"<="&B3)


My attempt was as follows but contains an error.

=SUMIFS(RAW!A:A,">"&(TODAY()-42,RAW!J:J,RAW!I:I,Joe Bloggs",RAW!B:B,"2015")


Thanks
 
Upvote 0
Which range are you trying to sum? Also, you should avoid referencing whole columns, try & reduce it to your actual range.
 
Upvote 0
The formula should sum RAW!A:A.

I understand whole columns is not ideal however over the year there will be alot of a data coming in from a data source and therefore the range would effectively change and would not want the formuala to 'Break' so to speak.
 
Upvote 0
The formula should sum RAW!A:A.

I understand whole columns is not ideal however over the year there will be alot of a data coming in from a data source and therefore the range would effectively change and would not want the formuala to 'Break' so to speak.

I thought Col A was your dates? Can you post a sample of your data, check my footnote for options to do this.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,334
Members
452,636
Latest member
laura12345

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