Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Using VBA to create charts

I am trying to write some VBA code to import data, create a single pivot table and then I want to create charts for each of the pivot table columns. I have the first two steps done but the charts are causing some issues.

I want to create a chart for time/Field_02 and another for time/Field_03. I would prefer using the data from the pivot table but it's not required. Using the imported data is an option.

Using the macro recorder to use the pivot table works but all the columns are pulled in and I have to hide the ones I do not want. I could duplicate the pivot tables but I am trying to do this and keep the size of the file as small as possible.

I am trying to do this in Excel 2010. Any ideas that will


Imported data
-------------
Date Time Field_01 Field_02 Field_03
11/02/2013 00:00:10 Database 201 0 0
11/02/2013 00:00:40 Database 201 9557 4356
11/02/2013 00:01:10 Database 201 9026 5115
11/02/2013 00:01:40 Database 201 8970 4926
11/02/2013 00:02:10 Database 201 9260 5319
11/02/2013 00:02:40 Database 201 8959 4884
11/02/2013 00:03:10 Database 201 9501 4425


Pivot table
-----------
Row Labels Sum of Field_02 Sum of Field_03 Sum of Field_04
00:00:10 0 0 0
00:00:40 9557 94 4356
00:01:10 9026 245 5115
00:01:40 8970 126 4926
00:02:10 9260 54 5319
00:02:40 8959 44 4884
00:03:10 9501 44 4425
00:03:40 6201 48 5513
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Using VBA to create charts

If you have code that does the thing, you only need code to hide a special pivotfield?

Check http://www.databison.com/pivot-table...able-in-excel/

There you find all code you need for this. I suggest you also pick one of them to create the pivot table instead of macro recorder solution.

Regards

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
Create several charts in one go using VBA andreashermle Excel Programming 4 August 31st 10 01:33 PM
Unable to click on charts & unable to create any new charts Excel Snapclick Charts and Charting in Excel 4 February 1st 09 07:59 PM
how to create 0 to 0 value charts vamsi Charts and Charting in Excel 1 September 24th 07 12:37 PM
how do i create 4 pie charts Mike Kim Charts and Charting in Excel 1 February 21st 06 10:22 AM
Best way to create 27 charts with vba? Gunnar Johansson Excel Programming 3 October 22nd 04 02:15 PM


All times are GMT +1. The time now is 03:13 AM.

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

About Us

"It's about Microsoft Excel"