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

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Status
Not open for further replies.

Forum statistics

Threads
1,215,287
Messages
6,124,080
Members
449,140
Latest member
SheetalDixit

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