I'm looking for a "best of breed" technique to make charts automatically reference data selections on the current worksheet. While I can manually key in a substitute name to reference the new worksheet, this is tedious. The chart "Edit Series" dialogue window refuses to accept a reference that doesn't include the current sheet name.Does anyone know if there is a "relative cell reference" SYNTAX that works with "select data" ranges when defining chart series?Or can someone suggest a macro that can be used to modify multiple chart references to point to current sheet, since the standard " Find and Replace" doesn't seem to interrogate the contents of charts.
Additional problem description detail:
I'm creating numerous custom charts in a " boilerplate" worksheet, each chart references adjacent data. Is there some way to make these charts reference the "current sheet" automatically when my "TEMPLATE" worksheet is copied to a new worksheet? Whenever I copy the boilerplate worksheet, the series definitions continue to point to the abolute name of the original worksheet: =TEMPLATE!$GD$398
While I can modify references manually (e.g. edit to =NEWSHEET!$GD$398), this is time consuming.
I have a project coming up where I will receive tables in a certain format. I want to be able to create a macro that well create a chart based on a single inputted cell (start of data). The chart will have 4 series and five values per series. See the link below for sample data! The first data point is not in the same place in the sheet, but the table will have the rest of the data relative to that!
I have a workbook with 50 worksheets, each worksheet has an Alpha name (ie names of people). Rather than write some code to go through each worksheet to create a report, is it possible to write a formula in a "Reports" worksheet that reads something like
=worksheet10!f2
where worksheet10! is the number of the worksheet (as seen in the VBA project window) while the name is "Billy".
I'd like to be able to create a copy of a worksheet and maintain the relative hyperlinks within each worksheet. Currently, when I copy a worksheet, the hyperlink takes me back to the original worksheet.
how to write a vb code to do the following actions with an excel sheet, which contains a dump from SAP. This dump usually consists of anywhere between 25 to 30 columns and about 20000 to 30000 rows
1. Find all rows which contain VN and place it into the sheet Vendor Charges (which already exists). Which could be in any column
2.Find all rows which contain MT and place it into the sheet Material Charges (which already exists).
I have attached the excel sheet to better explain what I had in mind. sheet1 contains the raw data from SAP but, the number of columns varies every time so it cannot be directly sorted by selecting the column. I tried recording a macro but, as I dont have a constant sheet to work with each time the macro obviously doesnt work.
I downloaded an Excel template from Microsoft and I noticed that it had a dedicated worksheet with a chart in the middle. The area around the chart was gray and didn't contain cells.
I've attached the template to this post.
How can I add this type of dedicated chart worksheet to one of my workbooks/
I'm trying to loop through a worksheet where each row is an individual record. I need a macro to read the row and create a chart on a separate worksheet for that row, then move on until a chart has been created for each individual row. In English the problem is:
Read Row 1 Create chart based on row 1 data in new worksheet 1 Read Row 2 Create chart based on row 2 data in new worksheet 2 And so on
able to keep a chart stationary while scrolling through a worksheet entering data. A few points:
1) 'Freeze pane' wouldn't work for me since the chart is too large and I'd prefer to have the data sheet unfrozen for easy perusal.
2) I saw mention of opening a separate window with the chart in it, while having the workbook window aligned next to it. I don't know if that can work, but I'd also prefer to just have the chart on the worksheet and stationary.
How can I break the link between a chart and a worksheet? If I change the name of the worksheet and try to use the chart I got an error that the current worksheet is the one that the chart is related to. I tried changing the source from the links option in the bar - no effect. I checked conditional formatting - also no effect. How can I break all existing links between the sheet and the macro?
I have a worksheet which is used to display analysis data to the user. The sheet will be further protected with only some cells available to the user. I've used the attached code to retrieve some data from the sheet, clear a bunch of cells to reset the sheet and reset a graph (the graph itself is plotted as a log-log with the 1 to 100 on the Y-axis, hence the resetting of data to 0.5 to push it below the axis and make it invisible ready for later data dumping).
The code worked fine until I protected the worksheet. I have set the charts to unlocked using the format option in the chart area prior to locking. When I run the code though, it stops on the line indicated with the error "Application-defined or object-defined error". I've double checked and Chart 7 is the correct chart, and it is unlocked according to its format properties.
VB:
'get date of survey and equipment number for retrieving the data from the archive dateSurvey = Worksheets("Calculation Page").Range("B2").Value equipNum = Worksheets("Calculation Page").Range("F2").Value 'stop screen updating Application.ScreenUpdating = False
[Code]....
EDIT: Oops, I've just noticed that even if I unprotect the sheet, I get an error on the .select within the seriescollection stating "Method 'Select' of Object 'Series' Failed", and the code worked perfectly before. I'm completely lost now...
The trend Equation on a chart is of the form y= a+x.(b+c.x) I want to use that equation in a spreadsheet to calculate value of y for the value of x. I can do it manually by inserting the a+x.(b+c.x) in a cell but would like it to be automatic as the a, b, c in the Equation changes regularly as more data is acquired.
I am trying to write a simple macro to create a chart over the used range in a worksheet. The first part of the macro correctly selects the used range which in this case is A1 to F19 when I single step through the macro. A listing of the macro is shown below:
Code:
Sub AddChartObject() ' Sheets("Sheet1").Activate Range("A1").Select Range(Selection, Selection.End(xlDown)).Select Range(Selection, Selection.End(xlToRight)).Select
[Code]...
When I place the formula given in MyArea as an argument for the source data, I receive a syntax error, so obviously it is the wrong argument. Numerous attempts to correct it also failed. As a sanity check, I placed the used range in an argument for the source data and was able to create the expected chart. fix the syntax error in the macro
I work with several graphs in three Worksheets in a Spreadsheet. I want to use text value 'Home Run', say, from Worksheet#1 CELL $A$5 into my Excel Graph Title; text value 'Score' as Y-Axis titile; text value 'Player Name' for X-Axis title.
Can it be done with Macro or VBS?
Attributes of Title are:
Font 14, BOLD Times Roman Automatic Resizing to sencond line if Title is long (but, less than 127 characters).
I have an excel report containing eight or so worksheets. A user can make a number of selections with the report to change its context. E.g. to analyse different types of customers; high spend or low spend etc. Sales projections are then presented with several Excel Charts adapting to the user's preferences.
My problem occurs when the user makes a selection (they choose a ComboBox option.) This then triggers my code, which creates the data tables and graphs depending on their selection. The report is quite long so I have created two points in the same worksheet where the user can change the same customer selection option. (Basically, all I have done is create a second ComboBox which triggers the first). Again, this works perfectly causing no errors (other than the display error belowc)
However, when I change the second instance of the ComboBox a phantom copy of my chart is dumped on the current screen view. If I scroll off screen and then back again the phantom chart disappears. I need a quick solution to fix this bug until I have some more time to look at what's causing it. Therefore I simply want to add a line of code, which will scroll off screen and then return back to the same position. (Not very neat, but at least it will get rid of my duplicate chart). As I have screen updating turned off the user won't notice what is happening.
now I thought about recording the macro, but it's an offset and if you click the chart, then it'll mvoe somewhere else even though the charts are always placed in the middle when generated. So I think I need to place it in a specific range. I want to use XY coordinates or range labels or something to that effect but would like something to this affect:
With Charts.Add .ChartWizard source:=Worksheets("sheet1").Range("a1:a20"), _ gallery:=xlLine, title:="February Data" End With
I got that in VBA help, but I'm not using Chart wizard, my code just creates the chart from the data on its own with specific chart type. So anyway, how would I make it put each of my five charts for the 25 people in the same place for every person. Performance Errors etc etc etc all will go in the right place everytime, regardless if you start with the page scrolled. I should do range right, but how do I change this macro to do it without chart wizard...just a chart that's already created and named. QUESTION: How do I place charts that are created from a data source onto a specific area of one worksheet, and those charts are always in the same place regardless of the person'a name.
I am trying to create a "dashboard" style report using a pivot table and pivot chart with slicers. All of these objects (table, chart and slicers) are in the same worksheet. However, the users of the report (read executive management) are not very Excel savvy and I want to protect the format of the report. So, I want to protect the sheet and only allow access to the Pivot table options. However, in order to make the slicers usable, it appears that I have to allow them to edit objects. This unfortunately means that they can then move those objects (the Slicers and Chart).
I am looking for a way to lock the slicers and pivot chart in position. I have already accounted for column width changes created by modification of the pivot table parameters by selecting the "Don't move or size with cells" option under PivotChart Tools > Size > Format Chart Area > Properties > Object positioning. This is the default/locked-out setting for the slicers.
in column A we have 100 numbers that change every day, and in column B 100 row with 2 condition (1; -1) that change too...
wich formula starting from A1 to A100 [/b]give me in C, at the right row of A, the relative max of A when B=1 (from the first "1" to the first "-1" of B) and then the min of A when B is -1 (from the first "-1" to the first "1" of B)?
I need to plot various data on top of stock charts.
This data could be irregular in date: it could be weekly, or simply random.
To plot this data by itself requires a Scatter Chart.
From what I know so far, you CANNOT DO THIS.
However, I suspect this could be done if I build a Stock Chart from scratch using a Scatter Chart.
Error bars can be used to make the tails, however, I don't know how they built the body bar which has the characteristics of a bar (border, and interior.)
But since I don't really need those two characteristics, I just need a wider error bar line that is provided in the chart edit window. I'm guess through a macro, there are wider line widths assignable.
I know this has been discussed a number of times, but here is my problem I have three charts in my workbook. I want to attach a macro so that when the chart is clicked it returns to Sheet - Home. I have using the following: worksheets("Home").activate. But after I protect each chart and the workbook, and save and exit. When I reload the Workbook it has forgotten the assigned macros and nothing happens.
I am looking for a creative way to display a pie chart within a data point marker of a line chart.
My database has 3 value columns, Type1, Type2 and the Total (Type1 + Type2) these are recorded per day (Date, in Column A)
I have a line chart that displays the total by date, but I want to find a way to display the percentage split of a particular day by type.
I was thinking to load the chart image into the Data point marker, but i don't think that is the best way as the data is updated daily and I would have to do it each day for a few line charts.
The other way I was thinking about was to have a generic Pie chat in the Line chart (Maybe in a corner) and the pie would update depending on way date series was selected or Mouseover'd)
the way that I am approaching it at the movement (Not the best way and by far not the coolest way. Is to have a list of all the dates in a column next to the Line chart and using some VBA, what ever date is selected in the column the pie chart displays the corresponding data. But eh challenge is that when there is alot of dates, I am going to be scrolling up and down.
I am using Excel 2010, but I cant not use the slicer's as the other users do not have 2010, they have 2007.
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.
I have created a population pyramid and want to add another chart on the secondary axis which I can do. The part which I seem not to be able to complete is getting the line chart secondary axis to read from the primary y axis. It seems to add a new axis, even when I delete this the line chart does not read correctly.
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.
I have written an SQL Stored proceedure which drags this information into excel.
All is well here, however because the information changes regularly adding and subtracting in row length it means I am having issues writing code for sums as a standard macro is absolute and not realative.
i want to do is to use value in [K8] and to find a row which matches the value in [A11:A35]. Then to pick up the cell where the value is. The problem is that i cant use "VLOOKUP" or "HLOOKUP" because the value can be in any of the rows or columns from [C11:I35].
There is allways only 1 value per row, if its for any use..