Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi, everyone:
I have two columns, column A and Column B. Column A is the date in format of mm/dd/yyyy. Column B is the cost corresponding to each date. How to get the sum of cost for each month in pivot table? I would also like to know the count of dates for each month. I appreciate your help! Jorge |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Since Col_A contains dates
Try this: Right-Click on the Date column of the Pivot Table Select "Group and Show Detail" .........Check: Months .........Click [OK] That will group all of the dates by Month and reflect their respective totals. If you want item counts by Month, too. Right-Click on the Pivot Table an check: Pivot Table Wizard Click the [Layout] button Drag the Cost field into the DATA area of the Pivot Table, again Double-click it and set the formula to Count Click [Finish] Does that help? *********** Regards, Ron XL2003, WinXP " wrote: hi, everyone: I have two columns, column A and Column B. Column A is the date in format of mm/dd/yyyy. Column B is the cost corresponding to each date. How to get the sum of cost for each month in pivot table? I would also like to know the count of dates for each month. I appreciate your help! Jorge |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ron:
Thanks for your help! However, I do not want the months to be combined if they belong to different years. How to prevent this? Jorge |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
When you are setting the Grouping.....
Hold down the [Ctrl] key while you select Months AND Years. The pivot table will then group Months by Years. Does that help? *********** Regards, Ron XL2003, WinXP " wrote: Ron: Thanks for your help! However, I do not want the months to be combined if they belong to different years. How to prevent this? Jorge |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ron:
Thank you so much. It works. One more question. I will use the data from the pivot table to plot a chart. From the excel, insert/chart/next/series/add/name (I put Series1 as the name) /Value. How to make this VALUE part as a dynamic range to reflect any newly added monthly cost? The reason is like this: I will add in new months/years to my original data input area. I have a code to update the PivotTable AUTOMATICALLY. Once I have a new month, the pivot table will show this new month. Since the data source of my chart is from the privot table, therefore, I need a dynamic range for the Chart which needs to reflect this newly added month's cost. Please advise! Thanks, Jorge |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Insert a column with =Year(date_column)
Make pivot table dragging first Year, then Date in the heading (row of column) Then use Ron's trick (which I had forgotten!) best wishes -- Bernard V Liengme Microsoft Excel MVP www.stfx.ca/people/bliengme remove caps from email wrote in message ps.com... Ron: Thanks for your help! However, I do not want the months to be combined if they belong to different years. How to prevent this? Jorge |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() A quick-and-dirty way would be to insert a new B column In B1 enter =MONTH(A1) and copy down Your pivot table would then use these values (you could generate text like Jan, Feb... but this would give a sorting problem) best wishes -- Bernard V Liengme Microsoft Excel MVP www.stfx.ca/people/bliengme remove caps from email wrote in message ups.com... hi, everyone: I have two columns, column A and Column B. Column A is the date in format of mm/dd/yyyy. Column B is the cost corresponding to each date. How to get the sum of cost for each month in pivot table? I would also like to know the count of dates for each month. I appreciate your help! Jorge |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
count month when date is in day/month/year format | Excel Worksheet Functions | |||
excel to make the days cary over month to month automaticly | New Users to Excel | |||
Excel 2003 month to month data change grid | Excel Discussion (Misc queries) | |||
copy worksheet from previous month and rename to current month | Excel Programming | |||
transfer cell $ amount to other sheet month-to-month without overc | Excel Discussion (Misc queries) |