Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel grouping 1

Status
Not open for further replies.

Eddyoftheyear

Technical User
Aug 11, 2010
57
US
Hi,

I have data that I would like to group in columns semi annually and quarterly. I ran the pivot table in 2007 but I am not able to change the column sitting to group data in quarters or semi annually. it show the data monthly.

Coustomer_number Name Description total_Orders Date

 



Hi,

The reason that you cannot group a PivotField, is because it has a mixture of NUMERIC AND TEXT data in it.

FIRST, you must remove the inconsistent data.

Then you must clear the PivotCache of these values as well. This takes a VBA procedure. Paste this procedure in a module in your VBA Project (alt+F11 toggles between the worksheet and the VB Editor) I would recommend pasting this procedure into your PERSONEL.XLS orPERSONEL.XLSB workbook. That way you will have it available any time you need it in ANY workbook.
Code:
Sub CleanMyPivots()
'SkipVought/2007 Apr 30/
'--------------------------------------------------
':cleans up pivot tables having OLD/UNUSED data hanging around.
'--------------------------------------------------
    Dim pc As PivotCache
    For Each pc In ActiveWorkbook.PivotCaches
       pc.MissingItemsLimit = xlMissingItemsNone
       pc.Refresh
    Next
End Sub


Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top