Pivot Chart Type Changing
Feb 15, 2010
I have an issue with pivot charts that I can't figure out and I can't find anyone with the same problems either. I have several big reports that use data from 2005 onwards that need to be represented on graphs separated by the city the data belongs to and different ranges of the results. This data is being sourced from inside each workbook on another tab and turned into a series of pivot tables (for each city) which provides the source for the charts. I did it like this because if I use pivot graphs I don't have to go through and individually change the data source range in the charts every time - because there are so many.
My problem is that when I refresh the pivot tables (to bring in the new data) the pivot charts 'chart type' resets. They should be represented in a Line - Column on 2 Axes chart and I have set this as the defult type but after refreshing it reverts to a basic column graph and I have to go through and change them all back manually. I made a macro that acts on a currently selected chart to change the format to make this process a bit faster:
View 2 Replies
ADVERTISEMENT
Dec 19, 2008
My boss wants me to design a dynamic, updatable chart in Excel 2003. I initially made a Pivot Chart based on a Pivot Table which worked perfectly, but it doesn't look professional enough when printed (or viewed) and she wants me to approach it a different way.
So, I created a graph based on the data in a Pivot Table, and used dynamic ranges as the source for the graph series so that the chart updates when the criteria fields are changed for the Pivot Table. I then added two combo boxes (ie data validation lists) to the Chart sheet, and wrote VBA code so that whenever the combo box values are changed, the Criteria fields for the Pivot Table on the 2nd sheet are updated accordingly, and this in turn causes the graph to be updated as well.
This solution also worked perfectly, but now I've been told to create the graph without macros.
Does anyone have any suggestions? The requirements/details are as follows:
1. The Pivot Table is on sheet "PIVOT", and the graph is on sheet "GRAPH"
2. The Pivot Table has two criteria - School Name and Year Level
3. On sheet "GRAPH" there are two data-validated fields, School and Year, which only allow the selection of valid Schools and Year Levels
Is there any way to make the Pivot Table update when values are changed in the fields on the CHART sheet so that the chart also updates, but without using code nor a Pivot Chart?
View 9 Replies
View Related
Mar 21, 2007
1) i have office 2003 on a laptop. within powerpoint, i can create a 'microsoft excel chart 11' object. to create a link to the excel data source, do i have to go through the odbc sql setup? it works, but i don't want my powerpoint to be dependent on some excel file somewhere. what are the other options to insert/make a functional pivot chart in powerpoint with the data also within powerpoint? the data as sheet option does not result in the chart being a pivot, it's just a plain chart. it has to be a proper object, not an image paste or a chart that updates links with the excel file open.
2) i have office 2007 on my other laptop. i can not find any suitable object to choose from to make a pivot chart in powerpoint. what's the best way to go about in 2007 version?
3) am i going about this the wrong way with the objects? should i be after vba code?
View 4 Replies
View Related
Jul 19, 2012
My question is regarding changing properties in a chart without activating it. My current example is with adding data labels, but there are many other instances I could use this information in. Here is my current code:
VB: ActiveChart.SeriesCollection(2).ApplyDataLabels
However, I was hoping to replace it with something like this:
VB: Sheets("Dashboard").ChartObjects("Chart 1").SeriesCollection(2).ApplyDataLabels
I get the "Object doesn't support this property/method" error. Is there a way to do this? It just seems inefficient to have to activate the chart in order to make changes.
View 2 Replies
View Related
May 14, 2014
Here's what I'm doing: I'm using a macro to assign a cell value to a variable then set another cell value to the variable instead of copy/paste (because even pasting values only was affecting other formulas in the file for some reason)
The problem: in using the macro, the number being 'copied' is acquiring a few extra decimal places IE 38334.61 is the original number and 38334.609375 is what I end up with. The numbers come from a CSV with only 2 decimal places and I checked by adding decimal places in the format so it's not a formatting/visible digits issue. Since the values are hour meter readings, the extra decimal places end up with very small values outside 0-24 hrs which messes with sorting and usage %. The values are so small all of them together in a month add up to a fraction of a cent but it's one of those things that bugs my OCD by not being right.
My VBA book explains the min/max capabilities, content type, memory bits but not fiddly details like this.
So my question is this: right now I'm declaring the clipboard-substitue variable as an single, is there a different one that would work better without adding anything? Criteria are: numeric, 6 digits before the decimal, 2 after, all positive values. (Ie 123456.12)
EDIT: fixed my senior moment.
View 6 Replies
View Related
Jan 26, 2009
I recorded a macro where a xyscatter graph is produced with markers connected by lines.
Is there a way to change to to force the graph to be a xyscatter graph without lines?
View 4 Replies
View Related
Apr 18, 2013
How can I add missing values to the axis in a pivot chart line chart? I have a numerical X-axis with values such as 0,1,5,8,14, etc. I have another set of Y values that correspond to the X values. If this was an XY-scatter plot I'd be able to plot X vs. Y and connect the dots for "gaps" in the X values. Since it's a pivot chart I cannot use an XY-scatter plot, I can only use a line chart. The line chart doesn't give me the ability to add the "missing" values, so it gives the impression that my data is more closely packed than it is. The data source is external to my spreadsheet, so I cannot add the values before creating the pivot table/chart.
View 1 Replies
View Related
Oct 23, 2006
I am trying to figure out a way in excel to graph some data I have in a new, sophisticated type of chart. My data is new square foot sales divided by new square feet (for a retail store). It is a dollar amount. I also have this data as a percentage change year over year. If I want to compare two stores with different data -- what would be the best way to present it on a chart. Is there a way to show this on a 3-D plane so that both companies have the data in the same chart up against each other?
View 2 Replies
View Related
Aug 15, 2006
I have created quite a nice little macro that;
drills through a lot of key figures, updates a pivot chart and copies the chart to powerpoint.
However it crashes on one particular data set every time with this error:
Run-time error '1004':
Unable to set the _Default property of the pivot item class
The code where the debugger stops is the last line below here.
lngKpi = Sheets("Helpfile"). Cells(lngRow, 2)
Sheets("Charts").Select
ActiveSheet.ChartObjects("DK").Activate
ActiveChart.PivotLayout.PivotTable.PivotFields("KPI # (overall").CurrentPage = lngKpi
I can manually change the pivot chart to the keyfigure it crashes on and thereby workaround the problem in the macro. Also it works for more than 50 other keyfigures without problems.
View 9 Replies
View Related
Feb 19, 2010
when opening the workbook with Excel 2010 beta I folllowing error:
Run-tim error '1004':
The specified dimension is not valid for the current chart type.
View 9 Replies
View Related
Sep 7, 2007
I was just wondering if there was a way of changing the excel chart default so it doesn't always return a grey (or gray for those of you over the pond !) plot area every time I create a chart. It looks rank and wastes toner IMO.
View 8 Replies
View Related
Jan 16, 2014
I have a excel with data values in 5 different columns.
Column A: Time in seconds (1,2,3,4,5.... so on) continuously in equal intervals.
Column B: Values Generated by my machine at each second (random values)
Column C: Values generated based on column B using a formula (Let formula be denoted by " F ").
Column D: Highest possible value of calculation on column B (With +ve error consideration in formula "F")
Column E: Least possible value of calculation on column B (With -ve error consideration in formula "F")
Two graphs need to be generated as follows:
Graph 1:
X Axis: time values ( From Column A )
Y Axis: Corresponding machine generated values from Column B
Graph 2: Envelope
X Axis: time values ( From Column A )
Y Axis: Both value of column D & E ( Time value 1 sec has two corresponding values, one from Column D and one from Column E)
Both values of Column D and E be plotted and the area between two lines generated by upper limit and lower limit (Column D and E respectively)
So for both, what chart types should I select, and how do I assign that particular column to that particular axis only.
View 2 Replies
View Related
Feb 20, 2009
i'm trying to delete a specific type of chart from the active sheet using this macro:
View 2 Replies
View Related
Jul 14, 2006
I have made a simple procedure (which will extend to make something that I have to make but for time being) it asks user to select a chart type in a userform using option buttons and then the chosen chart type is taken as the chart type and makes the chart.
problem is that the typechart - variable to identify the chosen chart type - is not being recognised. Here's the coding, the variable is not passed (in yellow bolded) from one procedure to another?
Private Sub NextButton_Click()
Call ShowType
If bFlag = False Then
MsgBox "Not Selected"
Call ShowType
Else
Call MakeChart
End If
End Sub
View 5 Replies
View Related
May 22, 2014
I'm using a stacked bar chart (in Excel 2010, running on Windows 7) to create a simple Gantt-type chart - with just four or five bars. I've got my chart looking most of the way I want it to, but one thing still eludes me: I'd like to set up the major axis ticks to be quarters of the year (from 1/1/2011 to 4/1/2013). Since quarters are not regular intervals (they are not exactly every 90 days), I can't do this using Excel's standard functionality for choosing axis tick marks.
View 3 Replies
View Related
May 16, 2006
Please look at the sample workbook below. The chart you see below is fine BUT I would like in a pivot table chart, so I could select any days on the pivot chart. I have tried it to do it myself but for some reason the time is not displaying on the pivot chart correctly. Any help please ?
P.S. If not possible then can we add a scroll bar or something?
View 6 Replies
View Related
Aug 12, 2006
I have created a pivot table and chart. The pivot chart consists of three sets of data from the pivot table. Two of the data sets are lines and the third data set is displayed as columns. I made the third data set into columns by right clicking on the data series line and selecting chart type. I change the chart type for that data set to a column and it worked great. The only problem is that when data is refreshed in the associated pivot table, the entire chart turns into columns with completely different formatting. Does anyone know how I can maintain the graph with the two lines and one column data set when I refresh the data?
View 4 Replies
View Related
Apr 24, 2006
I want to have the "category (x) axis label" to change with each new entry into column A. I would like to start from the last entry and go back 30 and have that change each time there is a new entry. I guess what I am trying to say is I only want to chart the last 30 entries.
View 2 Replies
View Related
Jul 1, 2006
Sub autograph()
Dim x As Long, t As Long, y As Long, z As Long
y = 3
z = 5
x = 4
While x < 609
With Worksheets("cabernet (2)")
t = Cells(x, 1).Value
Charts.Add
ActiveChart.ChartType = xlLineMarkers
ActiveChart.SetSourceData Source:=Sheets("cabernet (2)").Range("B" & y & ":H" & z), PlotBy:=xlRows
ActiveChart.Location where:=xlLocationAsObject, Name:="Cabernet (2)"
ActiveWindow.Visible = False
ActiveChart.HasTitle = True
ActiveChart.charttitle.Text = " " & t
Windows("complete Favorite Genes.xls").Activate
y = y + 3
z = z + 3
x = x + 3
End With
Wend
End Sub
This time, however, instead of having a slight idea of what I need to do, I don't have the slightest of where to start. I need to move all of these charts into another sheet, sheet1, and i'd like to offset them or do something so that they aren't all right on top of each other. I'd be more specific but I don't really know exactly what you can or can't do.
View 2 Replies
View Related
Jan 31, 2007
I'm trying to create a chart with different source ranges e.g if i used
With ch.Chart
.SeriesCollection.Add _
Source:=Worksheets(1).Source:=Worksheets(1).Range("C1:C8,J1:J8")
End With
That works fine but I want to modify the columns it looks at. I was going to use the cells(x,y) method but I can't get it to work. icol = 3. Range(Cells(1, iCol), Cells(8, iCol)). This works for a single range(C1:C8), but how do i reference Range("C1:C8,J1:J8") in the same way.
View 3 Replies
View Related
Jul 14, 2014
I have a workbook, with 2 sheets. first page has graphs, second has data. in my charts I refer to a named range on the second one as follows: Data!Named_Range, where "Data" is the name of the second sheet. However when i save this, it changes the range of the chart to: '101044.xlsm'!Named_Range, where 101044 is the name of the workbook. This is a problem for me as this workbook will often be loaded into a document handling system where the file will change name, throwing out all sorts of errors because the chart path is invalid, and i have to change the range of all the charts manually. why does it have to use the file name when reffering inside the same workbook? and how do i force this to not change?
View 5 Replies
View Related
Dec 14, 2012
I have a quarterly report that measures the safety performance of the plants in our company using bar charts. One set of 4 charts for the company as a whole and four additional sets of four for each of our divisions for a total of 20 charts.
I would like to change the color of the bars based on whether the location has met (bars colored green) or failed to meet (bars colored red) the goal for that criteria. The company average will be a yellow bar. Of course it can be done manually but that is really slow and tedious.
Is there a way, using VBA or a macro, to change the color of a bar (data point) based on the value of that data point? Can it run through all of the data points in each chart and make those changes based on criteria that I can set for each type of chart?
View 3 Replies
View Related
May 9, 2008
I am trying to create a chart that will show each month of the year's workload based on orders due for each month. I have all of the information needed on a spreadsheet to chart this into a simple chart showing the load, however, I want a little extra on the charting to show me additional details.
I would like for my chart to also display the available man hours for each month against the workload. I would like for the available man hours to be displayed by color changes in each month bar column of the graph.
So if I had 1000 hours of work in the month of April and only 960 man hours available in April it would have shown me throughout the month as the chart grew that I was "Green" for all hours below 860. The as the chart grew past 860 that portionof the chart changed to "Orange" telling me that the hours were soon to be full. Once it reached 960 that part of the chart would turn "Red" as an indication that we have more workload than we can complete for that month. This would be useful for me as an overtime tool, as well as for review for additional man hours or a decrease in man hours.
View 9 Replies
View Related
Jan 21, 2010
I have a spreadsheet which reports across different categories, but there's a lot of info. So simplify this, I've written a simple macro that changes the series range in an existing chart, so top level and by category. This works well apart from I'm using excel 2007, and some people aren't, so the default colours look fine on my version, but change to some awful colours on anyone with an earlier version of excel. I need a way of changing the colours to standard ones depending on which macro is being run.
I have tried running the following, but I get an error, basically saying the series hasn't been selected.
ActiveSheet.ChartObjects("Chart 6").Activate
ActiveChart.SeriesCollection(3).Select
ActiveChart.SeriesCollection(3).Interior.Color = RGB(255, 0, 0)
View 9 Replies
View Related
Aug 11, 2006
I am trying to create a macro which will allow me to change the source data for a particular chart. what i want to do is to have a code which looks in a range of cells (A8:B28) and then updates the chart to only include those cells within the range that contain a value? The number of cells with values changes depending on what options are selected elsewhere in the spreadsheet.
View 2 Replies
View Related
Oct 24, 2006
I have a chart updating on a weekly basis
a) can i select a whole range without the chart picking up any blank cells or zeros, if so then a lot of my other question will be redundant
b) I only want to show 4 weeks at a time, so when a new column of data is added on, how do i get VBA to shift the range accross 1 to the right e.g.
week 36 37 38 39
Shift to
week 37 38 39 40
View 5 Replies
View Related
Feb 9, 2007
I have a sheet ( Graphs A) with 50+ graphs on all linked to a datasheet (Data A).
I now want to copy these graphs to another sheet (Graphs B) which links to a different data sheet (Data B). The data is in the same layout format etc.
The problem is that the find-replace function will not replace the sheet name in the charts series formula from Data A to Data B
Is there an easy way to change the source sheet for the new graphs?
View 3 Replies
View Related
May 8, 2009
I seem to have a small problem with a Pivot Table on a file that we get weekly. I've built a macro to run across the file to format it and refresh. The problem is, sometimes it fails because the Pivot Table is listed as "PivotTable1" and sometimes it comes through as "PivotTable2".
I'd like to amend it so that regardless of it's name, it can be renamed to "MainPivot" or something similar.
View 2 Replies
View Related
Feb 12, 2013
VBA code that would update a chart automatically as you change the inputs which are located in cells in excel. The inputs are located in cells B5:B9 and i want a code so that as you change these numbers the chart would automatically update.
View 1 Replies
View Related
Oct 10, 2013
This should be pretty simple but I don't know how to do it. When I run the macro recorder, it doesnt record the change. I just want to change the number format of the chart labels from currency to a normal number and visa-versa. Why doesnt this work?
Code:
ActiveSheet.ChartObjects("chart 5").SeriesCollection(1).DataLabels.NumberFormat = "[$-809]#,##0.00;-[$-809]#,##0.00"
View 2 Replies
View Related