Welcome to the Excel Forum

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.

Please Register to Remove these Ads

Please Register to Remove these Ads



Reply
  #1  
Old 07-28-2009, 04:21 PM
mrgillus mrgillus is offline
Forum Contributor
 
Join Date: 08 Jul 2009
Location: Missouri
MS Office Version:Excel 2003
Posts: 176
mrgillus is becoming part of the community
How do I get Month Names to show up in my Pivot Table?

Please Register to Remove these Ads

After a lot of tweaking I managed to get the Number of the Month to display- For about 40 minutes I hassled with this to stop it from displaying each individual day. Now that I got it by month it is by labeled according to the number month.. 1, 2, 3, etc. How can I get this thing to display the month?! January February, etc.. I'm new to Pivot and am still stumbling over how this works..

Thanks for all the help!
Attached Files
File Type: xls Pivot.xls (140.0 KB, 4 views)

Last edited by mrgillus; 08-10-2009 at 08:48 AM.
Reply With Quote
  #2  
Old 07-28-2009, 04:27 PM
mrgillus mrgillus is offline
Forum Contributor
 
Join Date: 08 Jul 2009
Location: Missouri
MS Office Version:Excel 2003
Posts: 176
mrgillus is becoming part of the community
Re: How do I get Month Names to show up in my Pivot Table?

Also, If I have added a conditional formatting to a pivot table and data is added, how do you get it to automatically extend the formatting down the rows? e.g. MOD(ROW(),2 to alternate line colors..
Reply With Quote
  #3  
Old 07-28-2009, 04:44 PM
DonkeyOte's Avatar
DonkeyOte DonkeyOte is offline
Forum Guru
 
Join Date: 22 Oct 2008
Location: Suffolk, UK
MS Office Version:2002 & 2007
Posts: 13,665
DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute
Re: How do I get Month Names to show up in my Pivot Table?

Suggestion...

Create a Named Range:

Name: _PTData
RefersTo: ='Data Entry!$A$1:INDEX('Data Entry'!$L:$L,MATCH(9.99999999999999E+307,'Data Entry'!$B:$B))

Alter your PT Source Range to be: =_PTData

On the PT itself, remove "Month" from Column Field and replace with "Date Opened", right click on any given date and select Group -> select both Year and Month, this grouping should result in your desired output (based on my interpretation)
Reply With Quote
  #4  
Old 07-29-2009, 08:19 AM
mrgillus mrgillus is offline
Forum Contributor
 
Join Date: 08 Jul 2009
Location: Missouri
MS Office Version:Excel 2003
Posts: 176
mrgillus is becoming part of the community
Re: How do I get Month Names to show up in my Pivot Table?

Thanks for your help Donk... I did as you said and that works perfect for the date.. However, it still doesn't appear to be carrying the conditional formatting down in the pivotable whenever I add new data.. Was that formula supposed to help that or was it just something to better than just manually selecting the range with the data in it?

Thanks again,
Reply With Quote
  #5  
Old 07-29-2009, 08:37 AM
mrgillus mrgillus is offline
Forum Contributor
 
Join Date: 08 Jul 2009
Location: Missouri
MS Office Version:Excel 2003
Posts: 176
mrgillus is becoming part of the community
Re: How do I get Month Names to show up in my Pivot Table?

Please forgive me for the Barage of questions I have about this.. I am trying to figure this out on my own... For every letter in the Work Center there is a name associated. e.g. "K" would be subcontractors.. Can I incorporate the Names of what each letter is into the pivot table? Basically a custom row in the pivot that I can write a formula to index the list of letters with the corresponding name..

Thanks
Reply With Quote
  #6  
Old 07-29-2009, 08:48 AM
DonkeyOte's Avatar
DonkeyOte DonkeyOte is offline
Forum Guru
 
Join Date: 22 Oct 2008
Location: Suffolk, UK
MS Office Version:2002 & 2007
Posts: 13,665
DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute
Re: How do I get Month Names to show up in my Pivot Table?

Quote:
However, it still doesn't appear to be carrying the conditional formatting down in the pivotable whenever I add new data.. Was that formula supposed to help that or was it just something to better than just manually selecting the range with the data in it?
Re: conditional formatting... things get a little trickier here given your PT's can move, expand/contract etc... (at least theoeretically), as to whether or not there's a watertight method for doing this I don't know, I'm no PT expert myself I'm afraid... the below approach is to use the VBA Pivot Table Update Event such that as the PT is refreshed the formatting is reapplied such that even rows within the DataBody Range are formatted, obviously if you have historic rows that no longer form part of the PT (ie has contracted) you may end up with legacy formatting issues (ie rows formatted that should no longer be formatted...)

Code:
Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable)
Dim rngData As Range, lngRow As Long
If UCase(Target.Name) = "PIVOTTABLE1" Then
    Set rngData = Target.DataBodyRange
    rngData.Interior.ColorIndex = xlNone
    For lngRow = 1 To rngData.Rows.Count - 1 Step 1
        If lngRow Mod 2 = 0 Then rngData.Rows(lngRow).Interior.ColorIndex = 15
    Next lngRow
    Set rngData = Nothing
End If
End Sub
(the above is set to apply only to pivottable1 - remove this test if you want the same formatting applied to any/all pivot table that is updated on the sheet)

In XL2007 things become a lot easier as the PT formatting options are significantly enhanced ... there may be a way to do likewise in the earlier versions but in truth I don't know them off hand (the styles as I recall are quite limited) - I will look around to see if I can find some good links on the subject (most likely Contextures!).
Reply With Quote
  #7  
Old 07-29-2009, 09:07 AM
mrgillus mrgillus is offline
Forum Contributor
 
Join Date: 08 Jul 2009
Location: Missouri
MS Office Version:Excel 2003
Posts: 176
mrgillus is becoming part of the community
Re: How do I get Month Names to show up in my Pivot Table?

I appreciate your help... Yeh I am definitely not a fan of these pivot tables.. They do seem to have a very limited ability to format and even if I center the text in the cells, as soon as a new cell is added it goes back to left alignment.. arrgghh!

I'll see what I can do with this..

Thanks again for your help though. I have learned a lot more than when I started about these tables
Reply With Quote
  #8  
Old 07-29-2009, 09:08 AM
DonkeyOte's Avatar
DonkeyOte DonkeyOte is offline
Forum Guru
 
Join Date: 22 Oct 2008
Location: Suffolk, UK
MS Office Version:2002 & 2007
Posts: 13,665
DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute
Re: How do I get Month Names to show up in my Pivot Table?

Quote:
For every letter in the Work Center there is a name associated. e.g. "K" would be subcontractors.. Can I incorporate the Names of what each letter is into the pivot table?
To keep things simple, based on your latest layout on sheet 'Data Entry' (which is a lot better incidentally!) I would advise you do something along the lines of the below:

1 - insert a new sheet - named say "LOOKUPS"
in Column A insert the various Work Centre Codes, in B the associated values (ie subcontractor)

2 - go back to 'Data Entry' sheet, add a further calculation column
M1: Work Center Desc.
M2 =IF($G2="","",VLOOKUP($G2,LOOKUPS!$A:$B,2,0))
copy down for all rows

3 - revise your RefersTo Range for Defined Name: _PTData such that reference to $L:$L becomes $M:$M

4 - go to your Pivot Table, Refresh - then right click and Select the Wizard...

click Layout:

a) drag the new Field (Work Center Desc.) and place below Work Center in the Row Field
b) double click on each of the 2 ROW Fields (Work Centre, Work Centre Desc.) and set SubTotal to None

then click OK and Finish
Reply With Quote
  #9  
Old 07-29-2009, 09:14 AM
DonkeyOte's Avatar
DonkeyOte DonkeyOte is offline
Forum Guru
 
Join Date: 22 Oct 2008
Location: Suffolk, UK
MS Office Version:2002 & 2007
Posts: 13,665
DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute
Re: How do I get Month Names to show up in my Pivot Table?

Quote:
Originally Posted by mrgillus View Post
...I am definitely not a fan of these pivot tables..
Shame, I personally believe Pivot Tables should be the very first thing that anyone who uses XL on an even a weekly basis should learn to use... they enable the user to generate high-end analysis very quickly without requiring any extensive knowledge of formulae etc... and generally speaking they are pretty efficient (ie much more so than replicating the same analysis using formulas) ... they also encourage people to store their data correctly... ie show the value to be gained by adopting good data storage practices.
Reply With Quote
  #10  
Old 07-29-2009, 09:22 AM
mrgillus mrgillus is offline
Forum Contributor
 
Join Date: 08 Jul 2009
Location: Missouri
MS Office Version:Excel 2003
Posts: 176
mrgillus is becoming part of the community
Re: How do I get Month Names to show up in my Pivot Table?

Quote:
Originally Posted by DonkeyOte View Post
Shame, I personally believe Pivot Tables should be the very first thing that anyone who uses XL on an even a weekly basis should learn to use... they enable the user to generate high-end analysis very quickly without requiring any extensive knowledge of formulae etc... and generally speaking they are pretty efficient (ie much more so than replicating the same analysis using formulas) ... they also encourage people to store their data correctly... ie show the value to be gained by adopting good data storage practices.
No I totally agree with you there! It is very streamlined and really was able to setup this data the same way I had it in a fraction of the time and is also much more reliable. I just don't like the fact that it is not retaining any of my formatting.. Bold, Center align... I'm sure there is a way to do it and once I figure that out I will more than likely love these things.. They really are very impressive in their abilities to sort and work with data!
Reply With Quote
  #11  
Old 07-29-2009, 09:28 AM
mrgillus mrgillus is offline
Forum Contributor
 
Join Date: 08 Jul 2009
Location: Missouri
MS Office Version:Excel 2003
Posts: 176
mrgillus is becoming part of the community
Re: How do I get Month Names to show up in my Pivot Table?

Quote:
Originally Posted by DonkeyOte View Post
To keep things simple, based on your latest layout on sheet 'Data Entry' (which is a lot better incidentally!) I would advise you do something along the lines of the below:

1 - insert a new sheet - named say "LOOKUPS"
in Column A insert the various Work Centre Codes, in B the associated values (ie subcontractor)

2 - go back to 'Data Entry' sheet, add a further calculation column
M1: Work Center Desc.
M2 =IF($G2="","",VLOOKUP($G2,LOOKUPS!$A:$B,2,0))
copy down for all rows

3 - revise your RefersTo Range for Defined Name: _PTData such that reference to $L:$L becomes $M:$M

4 - go to your Pivot Table, Refresh - then right click and Select the Wizard...

click Layout:

a) drag the new Field (Work Center Desc.) and place below Work Center in the Row Field
b) double click on each of the 2 ROW Fields (Work Centre, Work Centre Desc.) and set SubTotal to None

then click OK and Finish
Oh Geez.. I didn't see that post till just now! Got that setup and that works awesome.. I think maybe I am starting to like this a bit better..

Cool
Reply With Quote


Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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

Forum Jump