Sum daily data into monthly data using array formulae

Status
Not open for further replies.

Red Rum

New Member
Joined
Jun 6, 2003
Messages
25
Firstly, I have been reading this board for a number or weeks, and have to say I have great admiration for the helpfulness and expertise of many of the contributors. I have so far learned many new tips.

However, i've got a problem I can't quite solve. I've been stuck for the last few hours, and have only half found a solution by some useful advice posted on http://www.cpearson.com/excel/array.htm. but can't get it to work with dates.

The problem...

Users enter trading data on a day by day and trade by trade basis.
I need to summarise this data in another worksheet, but on a monthly basis

The data...

INPUT SHEET
------A------B-------
1 Date , Amount
2 6-Apr-03 , 500
3 6-Apr-03 , 200
4 7-Apr-03 , 100
5 10-May-03 , 300
(dates input as Excel date format) This is only a simple representation - the actual input sheet has many more entries in per month.


OUTPUT SHEET
-------A-------B-----
1 Date , Amount
2 Apr-03 , 800
3 May-03 , 300
4 Jun-03 , -
etc

The array formula I have been trying in B2 of the output sheet is:
{=SUM(input!B2:B1000)*(MONTH(A2)=MONTH(input!A2:A1000))*(YEAR(A2)=YEAR(input!A2:A1000))}

But this returns 1100 in B2, and when copied down to B3, returns zero.

consequently I'm a bit perplexed, and wondered whether any of you could help me.

Any help you can give would be greatly appreciated.
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Status
Not open for further replies.

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

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