Sum data depending on a date

awwcraig

New Member
Joined
Dec 1, 2009
Messages
37
I have a workbook full of a bunch of sheets with the same formatting. Each sheet has data for a 2 week period.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:eek:ffice:eek:ffice" /><o:p></o:p>
<o:p></o:p>
I am making a “master” type sheet and I’m hoping to be able to pull some data from each sheet.<o:p></o:p>
<o:p></o:p>
On each sheet:<o:p></o:p>
Row 1 has dates starting on E1 and ending on AF1 (several blank/combined columns)<o:p></o:p>
Row 22 has the data I want to pull, and it is one column to the right of the date. So, F22 corresponds with E1…<o:p></o:p>
<o:p></o:p>
Ex.<o:p></o:p>
One sheet looks like this:<o:p></o:p>
E1 = 8/24/09<o:p></o:p>
AF1 = 9/6/09<o:p></o:p>
<o:p></o:p>
I got single amounts to work by using:<o:p></o:p>
<o:p></o:p>
=IF((MONTH(E1)=8),F22," ")<o:p></o:p>
<o:p></o:p>
However, I’m hoping to find a formula that would look at the entire two week period and sum the row 22 amounts for each day that falls within a certain month.<o:p></o:p>
<o:p></o:p>
I tried:<o:p></o:p>
=IF((MONTH(E1:AG1)=8),F22:AG22," ")<o:p></o:p>
<o:p></o:p>
Which comes back false since not all days in the two week period fall within August (8).<o:p></o:p>
<o:p></o:p>
Does anyone have any ideas for a formula that would be easily changeable, and that would pull & sum row 22 data for each row 1 date that falls within a certain month?<o:p></o:p>
<o:p></o:p>
Thanks much,<o:p></o:p>
 
Awesome, that second one is exactly what I needed. Instead of designating like A1 as the month, using 1-12 for the months worked. I got everything working now.

Thanks much
 
Upvote 0

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

Forum statistics

Threads
1,214,642
Messages
6,120,698
Members
448,979
Latest member
DET4492

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