Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Create interactive pivot table chart based on item selected | Charts and Charting in Excel | |||
How to create chart from Pivot table but not Pivot chart? | Charts and Charting in Excel | |||
Record Macro to Create Pivot Table | Excel Discussion (Misc queries) | |||
Can I run a macro to create a pivot table? | Excel Discussion (Misc queries) | |||
create space in line chart between points, linked to pivot table | Charts and Charting in Excel |