Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro to create pivot table/ chart

I've been looking to find a way to make macro that will take a set o
data and create a chart for me. The pivot table only takes a few row
of data and then sorts it into Top 15. Is there some sort of referenc
I can look at for help with this

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Macro to create pivot table/ chart

Try recording a macro that creates a table. Then go back and change the range.
It usually will be in a R1C1 format.
You can create a variable that stores the last row like

Dim Lrow as integer, MyRange as string

Lrow = sheets(1).range("A65000")end(xlup).row

MyRange = "A5:H" & Lrow

then substitute the R1C1 in the code with range(MyRange)

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 115
Default Macro to create pivot table/ chart

Even better, use something like
Range("A1").CurrentRegion.Address(xlReferenceStyle :=xlR1C1)
or
ActiveSheet.UsedRange.Address(xlReferenceStyle:=xl R1C1)
This makes it much easier than keeping track of the size of the data range.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______

Spammastergrand wrote:

Try recording a macro that creates a table. Then go back and change the range.
It usually will be in a R1C1 format.
You can create a variable that stores the last row like

Dim Lrow as integer, MyRange as string

Lrow = sheets(1).range("A65000")end(xlup).row

MyRange = "A5:H" & Lrow

then substitute the R1C1 in the code with range(MyRange)


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 interactive pivot table chart based on item selected Sacto Harley Charts and Charting in Excel 0 October 10th 07 10:50 PM
How to create chart from Pivot table but not Pivot chart? Daniel Charts and Charting in Excel 1 July 31st 07 01:32 AM
Record Macro to Create Pivot Table Ken Excel Discussion (Misc queries) 1 April 25th 07 09:42 PM
Can I run a macro to create a pivot table? Eqa Excel Discussion (Misc queries) 2 April 8th 07 06:16 AM
create space in line chart between points, linked to pivot table Mike -Z- Charts and Charting in Excel 1 December 7th 04 09:39 PM


All times are GMT +1. The time now is 10:43 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"