Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 505
Default Excel 2002 : How to sum by month and year ?

Dear Sir,

I need to sum invoices according to Month and Year as illustrated below:

May I know what formula I must input at cell E2 and copy down to get the
answers :


A B C D E
1 Date Mth / Yr Invoice Amount S. Total
2 21/02/2001 Feb-01 IV8047 200
3 08/02/2001 Feb-01 IV8048 350
4 28/02/2001 Feb-01 IV8049 100 650
5 01/03/2001 Mar-01 IV8050 500
6 05/03/2001 Mar-01 IV8051 660 1100
7 02/02/2002 Feb-02 IV8054 220
8 20/02/2002 Feb-02 IV8063 120 340
I try converting date to Month / Year format in column B and using formula
=IF(B2<B3,SUMIF(B2:B8,B2,D2:D8),""), but it does not work because all the
cells in column B are date values.


Thanks

Low




--
A36B58K641
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 171
Default Excel 2002 : How to sum by month and year ?

As you realized, the format of the cells in column B isn't helping because
the underlying values still differ. I'd try something like:
=if(and(year(b2)=year(b3),month(b2)=month(b3)),"", d2) in cell e2
=if(and(year(b2)=year(b3),month(b2)=month(b3)),"", sum(d$2:d3)-sum(e$2:e2))
in cell e3, then copy that formula down to subsequent rows. The assumption
(implicit in your approach as well, so I figure it's valid) is that all the
invoices from a particular month are grouped together.


"Mr. Low" wrote:

Dear Sir,

I need to sum invoices according to Month and Year as illustrated below:

May I know what formula I must input at cell E2 and copy down to get the
answers :


A B C D E
1 Date Mth / Yr Invoice Amount S. Total
2 21/02/2001 Feb-01 IV8047 200
3 08/02/2001 Feb-01 IV8048 350
4 28/02/2001 Feb-01 IV8049 100 650
5 01/03/2001 Mar-01 IV8050 500
6 05/03/2001 Mar-01 IV8051 660 1100
7 02/02/2002 Feb-02 IV8054 220
8 20/02/2002 Feb-02 IV8063 120 340
I try converting date to Month / Year format in column B and using formula
=IF(B2<B3,SUMIF(B2:B8,B2,D2:D8),""), but it does not work because all the
cells in column B are date values.


Thanks

Low




--
A36B58K641

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,886
Default Excel 2002 : How to sum by month and year ?

Hi

The easiest way is to create a Pivot Table.
Mark your range of data.
DataPivot TableFinish
Drag Date to the Row area of the Pivot Table skeleton
Drag Amount to the Data area
Right click on DateGroupGroup byselect Year and MonthOK

For more help on Pivot Tables take a look at the following sites
http://peltiertech.com/Excel/Pivots/pivotstart.htm
http://www.contextures.com/xlPivot02.html

http://www.datapigtechnologies.com/f...es/pivot1.html

http://www.edferrero.com/Tutorials.aspx

--
Regards

Roger Govier


"Mr. Low" wrote in message
...
Dear Sir,

I need to sum invoices according to Month and Year as illustrated
below:

May I know what formula I must input at cell E2 and copy down to get
the
answers :


A B C D E
1 Date Mth / Yr Invoice Amount S. Total
2 21/02/2001 Feb-01 IV8047 200
3 08/02/2001 Feb-01 IV8048 350
4 28/02/2001 Feb-01 IV8049 100 650
5 01/03/2001 Mar-01 IV8050 500
6 05/03/2001 Mar-01 IV8051 660 1100
7 02/02/2002 Feb-02 IV8054 220
8 20/02/2002 Feb-02 IV8063 120 340
I try converting date to Month / Year format in column B and using
formula
=IF(B2<B3,SUMIF(B2:B8,B2,D2:D8),""), but it does not work because all
the
cells in column B are date values.


Thanks

Low




--
A36B58K641



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2002 : How to sum up items by month, date and year ? Mr. Low Excel Discussion (Misc queries) 4 November 21st 06 11:51 AM
trying to get day/month/year froamt while user enters year only RADIOOZ New Users to Excel 3 June 7th 06 05:30 AM
Am I able to sort dates by month rather than year in excel? Ruth k. Excel Discussion (Misc queries) 1 November 3rd 05 03:18 PM
Excel should support DAYOFYEAR(year,month,day) returns julian dat. Neil Excel Worksheet Functions 1 February 24th 05 04:29 PM
Converting a date in Excel 2002 to a Year/Quarter format Jim Excel Worksheet Functions 2 January 10th 05 07:49 PM


All times are GMT +1. The time now is 09:11 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"