Sum daily data into monthly data using array formulae

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 leaned 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 100
4 Jun 03 -
etc

The formula I have been trying in B2 is:


This is only a simple representation - the actual input sheet has many more entries in per month.

What
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
I'd opt for a pivot table, with the dates grouped by year and month - are you familiar with pivot tables? can you set one up to do what you need?

PS welcome to the board!
 
Upvote 0
=SUMPRODUCT((MONTH(InputSheet!$A$2:$A$1000)=MONTH(A2))*INputSheet!$B$2:$B$1000)

Enter this formula in your output sheet column B and copy down
 
Upvote 0
Gnaga you are a star. Worked fine.
I'll now go and resaerch how sumproduct works.

Paddy D Thanks for suggesting Pivot tables.
I guess they are like trying to ride a bike- once you've mastered it they're easy.

(however i haven't mastered riding the bike yet)

Thanks again



_______________________________________________________

If sound doesn't travel in a vacuum, how come the Big Bang wasn't called the Big Silence!!!
 
Upvote 0
But the problem is there are 29 to 30 duplicated value for each month.
We can use "DATA=> delete duplication", but lots of NON-duplicated values are deleted, I don't know why. Can we try "OFFSET" command to get a unique column with only the data we need without duplication?
 
Upvote 0

Forum statistics

Threads
1,215,943
Messages
6,127,814
Members
449,409
Latest member
katiecolorado

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