Dynamic Chart/Graph For Changing Ranges

Apr 25, 2008

I have a database in excel with a lot of tables in which lets a uses a combo box so the user select can view just one table.

I want to be able to create a macro so when a button is pressed, it copies the data into a new workbook and creates a chart so they can do whatever they want without disrupting anything in the original workbook.

I have been able to find code that will export the data and create a chart (see below) but the problem is the range changes from table to table so I need to find a way of changing how the chart picks up the data range.

Sub Chart_New_Book()

Sheets("Temp").Select
Cells.Select
Selection.Copy
Workbooks.Add
ActiveSheet.Paste
Range("A1").Select
Charts.Add
ActiveChart.ChartType = xlColumnClustered
ActiveChart.SetSourceData Source:=Sheets("Sheet1").Range("A1:C10")
ActiveChart.Location Where:=xlLocationAsObject, Name:="Sheet1"
End Sub

So at the moment when charting ony cells A1:C10 will be plotted no matter what the size of the table is and making the target range bigger only sees the blank cells being plotted.

View 3 Replies


ADVERTISEMENT

Chart/Graph Changing/Variable Range

May 28, 2008

I have a vast database where I have linked charts. I send the data from a macro to the database and sometimes there are 1000 inputs and sometimes there are only 20.
How would i set up my charts to only graph the inputs that are present?

View 7 Replies View Related

Chart Dynamic Ranges

Jan 20, 2010

I have a stock chart that I want to update dynamically if the data record length changes. From the source data menu, I tried to use the following data ranges:

=OFFSET(Candles!$AB$8,1,0,COUNTA($AB:$AB)) ---> Date, x values
=OFFSET(Candles!$AD$8,1,0,COUNTA($AD:$AD)) ---> High
=OFFSET(Candles!$AE$8,1,0,COUNTA($AE:$AE)) ---> Low
=OFFSET(Candles!$AF$8,1,0,COUNTA($AF:$AF)) ---> Close

When I place any of these in the data range box under 'x axis labels or values', I receive the message "This function is not valid".

The MS webpage at http://office.microsoft.com/en-us/ex...098011033.aspx describes using these formulas but they don't appear to work.

View 9 Replies View Related

Excel 2010 :: Changing Default Chart / Graph Format Copied When Pasted Into Word?

Aug 28, 2012

I work with a team of users that are continually publishing reports in Word that contain charts and graphs copy and pasted from Excel into Word 2010.

We have a custom script that leverages a PDF engine to automatically convert .doc files to .PDF files that we distribute electronically to our clients. This all works great, but only if all my users select 'paste special' and Enhanced Metafile Format when adding their excel charts into our reports. Most of these people aren't tech savvy, and I'm havin ga hell of a time getting them to follow this workflow and am hoping there's a way in Office 2010 to select the default paste from excel into word when the content is a chart.

It seems like the default paste from excel is an embedded chart/graph that you can then further manipulate each component of the chart in Word; the default doesnt' paste an actual image. I am assuming the pdf renderer is using a lower resolution .PNG version of the image and when these are scaled for print and or pdf, they look like crap.

Is htere anyway I can automatically change the default paste format for the chart from excel into word to be an EMF/EMV (enhanced metafile?) Either thorugh the registry or some other saveable setting?

View 1 Replies View Related

Dynamic Ranges In 2007 Chart

Jul 24, 2008

I created a chart in Excel 2003 which relies on dynamic named ranges. For years this chart has been working beautifully. I recently converted to Excel 2007 and the chart no longer understands the dynamic named range for the x-axis. It understands the y-axis dynamic named ranges just fine. I have tried renaming the x-axis range to various names (none of which contain the word chart). I also experimented by just using a static range name. And I have tried recreating the chart from scratch with the same results. It lets me create the chart initially but then when I refresh the worksheet, the x-axis is blanked out.

View 9 Replies View Related

Auto Size Dynamic Changing Chart

Jun 14, 2008

I have created a dynamic chart in excel where either the number of Series or the number of Data Points will change dependent on user inputs in the model. I've done this using the Offset Function in a Defined Name in Excel and dropped this Defined Name into vba code using ActiveChart.SetSourceData.

Anyway, all works fine, pulling the correct data, etc. What doesn't work is the final appearence of the chart. The chart has a Legend placed at the bottom of the chart, as standard, unless there is only one Series, when I remove the legend altogether. Whilst the legend works fine, the Plot Area of the chart doesn't update automatically to accomodate the changing size / existence of the Legend. Does anybody know how to do this? I tried using hieght, etc properties, but I don't know how to make them variable

View 4 Replies View Related

Create Chart Using Dynamic Named Ranges For Series

Jul 27, 2012

I've created my dynamic named ranges using the OFFSET function, ex.

="OFFSET(SAMPLE!$D$4,1,0,COUNTA(SAMPLE!$D:$D)-1,1)"

I'm now trying to get my chart to use that range. I read at [URL] .... that I need to make sure my series reference is a fully qualified reference. So I've entered that series reference using the name of the workbook followed by the range name (=2012-PIRS.xlsx!SAM_CLAR2DEL). I have two copies of my workbook (one as xlsm with VBA project, and one with xlsx without VBA) and I can't get Excel to accept the series value in either workbook.

ERROR MSG:
The formula you typed contains an error. Try one of the following:
- Make sure you've included all parentheses and required arguments.
- To use a function, click Insert Function on the Formulas tab (in the Function Library group).
- If you include a reference to another sheet or workbook, verify that the reference is correct.
- If you are not trying to enter a formula, avoid.........

View 1 Replies View Related

Excel 2003 :: Filter Data In Graph / Chart (without Having To Create New Chart)

Dec 29, 2011

I have a spreadsheet created in Excel 2003 (which is what we use at work, unfortunately).

My employees periodically take a test to ensure they have certain items memorized (or are making progress to that end). The spreadsheet rows show all 46 of my employees, and their test scores. The columns are the dates that the tests are administered. I can create a line graph based on the chart data, and interpolate these data with no problems.

The problem is that there are 46 employees! 46 lines on the same graph make for a very cluttered, hard to understand visual. I want to simplify the view by "filtering out" some of the data.

I have an additional column in my spreadsheet for each employee's work area (Area 1, Area 2, etc), and another column with data based on first letter of last name (the values here could be "A-G", "H-M", "N-S" and "T-Z", for example). I figure i could filter my line graph based on these two columns. For example, somehow select just Area 1, and reduce the number of lines on the graph to 16. Or better yet, Choose "Area 2" AND "A-M" and end up with 7 employees (and therefore 7 lines on the graph).

Here's what i have tried:

1) Select the work area column, and use the Filter, which created a drop-down list at the column heading. When i use this drop-down list, i can easily filter the data in the worksheet by Work Area, but this is not reflected in the line graph, which still shows all 46 lines. The problem was that i forgot that i had set the Calculation Options to "Manual". Setting this to "Automatic" (or leaving it on Manual and pressing F9) solved the problem, as the chart now updates when i use the filters. Calculation options are under the "Formula" tab in 2007, or in Tools -> Options -> [either calculation or formula, i forget what it's called] in 2003.

2) Create several separate line graphs in several separate sheets. I wouldn't want to assign someone else the task of maintaining a spreadsheet of such inefficient design.

View 1 Replies View Related

How To Name A Dynamic Range & Make A Validation List (of 2 Dynamic Ranges)

Dec 22, 2009

I have a range which will change in size & in content, & I want this to be a Named Range at whatever size it is.

Reason I want to is because I want to make a Validation List with this dynamic range. I also want a Validation list which lists the content of 2 or more dynamic ranges which may or may not be on the same worksheet - is this possible?

i.e.
First dynamic range: called "Milestones" at A11
Second dynamic range: called "Activities" at A25
& make a Validation list that will list content of both

View 9 Replies View Related

Dynamic Starting Point For Dynamic Named Ranges

Jun 21, 2009

I would like to replace the blue bit of this Dynamic Named Range (DNR) with an INDIRECT formula in order to modify the starting point for the DNR: =OFFSET(DATA!$C$60,0,0,20,1). Unfortunately, I can’t seem to get my INDIRECT formula to work in order to use it to replace the blue bit above: INDIRECT("'"DATA"'!&ADDRESS(MATCH('SHEET1'!AC8,DATA_Date,0)+22,3)"). The orange bit of the formula above returns a value of 60, therefore the ADDRESS formula should return $C$60, that can then feed into the INDIRECT and act as the equivalent of DATA!$C$60. But it doesn’t.

View 2 Replies View Related

Dynamic Graph

Jul 28, 2008

I have a sheet that has names in column A and a list of subjects in Row 1. Cells B2:BA25 have the scores acheived for each person in each subject. I was thinking of creating a customisable graph where by there would be a dropdown box that could select a persons name and this would populate a bar graph of all that persons scores.

View 9 Replies View Related

VBA Changing Y-Axis Graph?

Apr 8, 2012

I am able to change the X-Axis with:

Code:

ActiveChart.Axes(xlCategory).TicketLables.Orientation = 45

How I change the Y-Axis?

View 1 Replies View Related

Graph The Following Data In An Area Chart With Line Charts Superimposed On The Area Chart

Nov 1, 2006

I am trying to graph the following data in an area chart with line charts superimposed on the area chart. I have a lot of data (and a lot going on) so I'm trying to figure out the best way to show this in excel from a functional standpoing (i can't get this to work in excel!!) to also an asthetic standpoint (dont want it to look terrible or illegible). This is what I'm trying to chart:

1) Weather data (temperature) by region:
So one region, would be: Northwest
I would like the "area" (so a shaded region) to be the min/max of the temperature data for each month.

2) I would like to show the temperature for each year as a line graph on the chart - so you can see if a year falls in or out of the shaded region.

3) I would like to show a company's sales increases across the same months per year as separate line charts. I may choose to just show the biggest outlier year in the end... or to show 2006 (the latest data).

What I am trying to convery with the chart is that the company's sales is or is not tied to weather deviations. I have attached an excel file with the data. I haven't been able to use the area chart or get a two axis chart to work or get it to look even remotely professional.

View 3 Replies View Related

Static Ranges And Dynamic Ranges

Feb 26, 2010

definitions for static ranges and dynamic ranges?

View 9 Replies View Related

Graph Using Named Ranges

May 15, 2009

Is it possible to create a chart based on value from a drop down?

The drop down has two values which are both named ranges.

There for I want to be able to choose from the drop down whether to display data per team or per agent.

View 9 Replies View Related

Dynamic Series For A Graph

Jun 30, 2014

I have a graph that auto updates but sometimes there is only 1 series and sometimes there is 2,3,4, or 5 series. Is there a way to have the graph update accordingly? and only have have the series that are valid be in the key on the graph. Currently the graph keeps all the series in the key even when there isn't any data for it.

Please see attachment. Use sheet 2 for the graph. and use the drop down menu to select catagory. this ia very quick mock up of the concept.

Graphseries.xlsx

View 4 Replies View Related

Dynamic Range In Graph

Apr 28, 2008

I have a table that has formulas that read off a pivot table. When the pivot table is updated, the other non-pivot table is updated. I created a graph off of the non-pivot table data. I want to do a bar chart, but if data is added to the pivot table (and then through formulas added to my non-pivot table) I want the graph to automatically update with the new fields. I can't figure out how to do this

For example, if my table had Grapes, apples and peaches and their quantities in cell A2:b4 if I choose range a2:b5 I don't get any data in my graph at all, if I choose the correct range a2:b4, I get a bar chart with Grapes, Apples and Peaches and thier quantites. If I added Strawberries to the Pivot table, the non-pivot table would update, but the graph is not grabbing row 5, I have to manually change the range to a2:b5.

View 9 Replies View Related

Changing Color Of Text On Graph?

Mar 27, 2012

I would like to change the color of my text on my X-axis of a graph. I would like to have 4 or 5 different colors to identify different categories. I see how I can change all the text but how would I change just the text in column 1-3 to red, column 4-7 to blue, etc...

View 2 Replies View Related

Changing A Graph To Vertical Orientation

Jun 17, 2007

I have a normal line graph I would like to see plotted vertically rather than the normal horizontal layout. In other words, points/lines would appear around a vertical axis and go from side to side. The normal graph would look as if it was tipped on its left side.

View 9 Replies View Related

Graph Based On Changing Range

Sep 4, 2006

I am trying to automate a graph for data that is not always the same amount but always in the same format. I have attached a spreadsheet that has an example of the data.

Columns B, D, & E are the ones that I am interested in charting in a line with markers type graph, but the rows may be 100 for one set of data and 1000 rows for another set of data. I am trying to get the macro to open a new worksheet and as part of the macro create a userform that will ask for the text information on the top of the worksheet (as this is not always correct when imported).

View 5 Replies View Related

Changing Chart Properties Without Activating Chart

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

Multiple Ranges Displaying In Same Graph?

Oct 19, 2012

I have 2 datasets that have a common y axis and was wondering if it is possible to graph them?

i.e. x axis A - hourly wage costs
x axis B - hourly sales
y axis - hours of the day

View 1 Replies View Related

VBA Plot Two Ranges In Different Colors In Same Graph

Oct 4, 2013

I have two ranges of cells containing names of chemicals, call the first one "Product" and the second one "Byproduct".

Also, there are two other ranges of cells, called "Productvalue" and "Byproductvalue". These cells contain the numerical values of products and byproducts. How can I plot both the products and byproducts in the same graph using xlBarClustered in different colors?

View 1 Replies View Related

Dynamic Graph Based On Listbox

Jan 13, 2014

I am making a dynamic graph with use of listboxes. Please see attached example.

In the example doc is a graph which is now static. Based on the rows I selected in the table, for store 1 and for february.
What I'd like is that a user can select a store and a month in 2 listboxes and that the graph is dynamically created based on dynamic selection in the table. I think I need to use the OFFSET function and some defined names but I'm not sure how.

Example.xlsx‎

View 3 Replies View Related

Changing Multiple Column Graph Sizes All At One Go

Mar 26, 2014

I have hundreds of column graphs, how do I quickly change the size of them to the exact same size of 8.1cm height and 26.4cm width.

View 1 Replies View Related

Dynamic Weekly Graph To Run From Monday To Sunday?

Oct 3, 2011

Is there a way to create a dynamic chart to automatically run from the most recent Monday to Sunday. So on Monday the entire chart will reset?

View 9 Replies View Related

Graph Needing Range Adjustments Dynamic

May 9, 2008

i have a graph that i've linked to let's say cells A1:C150

however, my range could sometimes needs to be shrunken to A1:A100 or A1:A40 etc. (the number of rows that are "active" is determined by cell K27)

i'd like for my graph to automatically adjust depending on the number of rows that are filled within the range above. can this be done with formulas and graph manipulations?

i've put in a formula currently that makes the value of the cells that would return 0 into "" but that doesn't seem to do the trick.

View 9 Replies View Related

Popup Form Linked To Dynamic Graph

Aug 6, 2008

This may be a tough one. Through a button, I am trying to create a popup window displaying an excel chart, viewed always on top, dynamically linked to my spreadsheet data. The idea would be to see it evolve as I input data, and be able to open as many as I want. I guess I could create a macro to paste/clear the graph, but a pop up window would appear more professional and more user friendly.

View 2 Replies View Related

Deleting The Units (letters) In Two Cell Ranges And Graph It

Jun 26, 2009

I would like to build a Macro to delete units (ex: 10V --->10) of two cell ranges that are not beside each other and eventually automate it to graph these two ranges because I will be running samples and have to produce a graphs for each sample.

I tried the code below, but I can't figure out how to include 2 ranges without deleting letters in other cells in in between the ranges.

for ex: I want to delete the non numerical characters in the two ranges C3:C1000 and H3:H1000 and graph these ranges.

View 5 Replies View Related

How Do I Not Graph A 0 Value On A Line Chart

Oct 26, 2009

I have created some charts for my work and one of them is a line chart that spreads across one year with values for each month. Well they want the graph to always show one month ahead of where we are out. So there is actuals in for Sep. but then the line graph drops all the way to 0 for Oct. I don't want to have the graph bottom out when there is a zero. Does anyone know how to fix this?

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved