Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old December 23rd, 2009, 09:26 AM
Registered User
 
Join Date: Dec 2009
Location: Louisiana - US
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default how to change pivot tables column label

i am just starting to learn excel vba so i am not sure what to do.
I have a pivot table that have the following data:
Time Key Value
12/21/2009 00:05:00 03057168 718
12/21/2009 00:05:00 03057169 283
12/21/2009 00:05:00 03057170 577
12/21/2009 00:05:00 03057171 -89
12/21/2009 00:05:00 03057172 -136
12/21/2009 00:05:00 03057173 -79

12/21/2009 00:10:00 03057168 694
12/21/2009 00:10:00 03057169 263
12/21/2009 00:10:00 03057170 544
12/21/2009 00:10:00 03057171 -89
12/21/2009 00:10:00 03057172 -141
12/21/2009 00:10:00 03057173 -85


This sequence repeats until all of the record have been read from my DB
The key can change depending on the site location that I am running query on

What I want to end up with is that data looking like the following

Row Headings:
date 03057168 03057169 03057170 03057171 03057172 03057173

Data for each column
12/21/2009 00:05:00 718 283 577 -89 -136 -79
12/21/2009 00:10:00 694 263 544 -89 -141 -85
12/21/2009 00:15:00 617 268 579 -95 -143 -83
12/21/2009 00:20:00 650 272 551 -101 -140 -85
12/21/2009 00:25:00 641 273 565 -97 -148 -86
12/21/2009 00:30:00 643 256 529 -105 -153 -91

All I want to do is to create a calculated formula that divides colums
D/A , E/B , F/C put these values in 3 new columns then make a pivot chart displays the 3 values
The actual key's may change but I do not need to worry about these just the actual values.

My Questions are:
1. Should a use a pivot table or the transpose function (not sure how to use the transpose function)
2. How do i refer (or rename) to the column label (03057168, 03057169, etc) so that i can perform the calculations base on the particular column value and not the labels. If i rename the column label (KWa, KWb, etc) when i do a refresh they get overwritten with the numbers.
3. How would I check to see how many rows exists to do calculations on

Not sure if this makes sense but please let me know if i need to provide additional information.

Thanks
RH
Reply With Quote
Reply


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 On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA for Pivot Tables stealthdevil Excel VBA 3 March 21st, 2007 04:01 PM
how to work pivot tables malli_kv2 Access 1 March 16th, 2007 06:34 AM
Linking pivot tables iacon Excel VBA 3 July 24th, 2006 01:25 AM
International Pivot Tables noldrini Excel VBA 0 February 8th, 2006 11:54 AM
Pivot Tables smartgir Excel VBA 0 May 12th, 2004 10:08 AM



All times are GMT -4. The time now is 06:04 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.