Multiple Non Adjacent Ranges For Chart

Aug 22, 2007

I am generating a chart through a macro. I am using 4 non adjacent range and the end point of the range is represented by a variable as the end point is not fixed. I am using following code.



Row = 5

StartPoint1 = "C19"
EndPoint1 = "C" & 19 + Row

StartPoint2 = "E19"
EndPoint2 = "E" & 19 + Row

StartPoint3 = "G19"
EndPoint3 = "G" & 19 + Row

StartPoint4 = "I19"
EndPoint4 = "I" & 19 + Row

ActiveChart.SetSourceData Source:= Sheets("Summary").Range( _
"StartPoint1:EndPoint1,StartPoint2:EndPoint2,StartPoint3:EndPoint3,StartPoint4:EndPoint4"), PlotBy:=xlColumns

View 9 Replies


ADVERTISEMENT

Can Automatically Create Named Ranges Based On Adjacent Cell Values?

Jul 11, 2013

Macro that could look at a row and take the values of two cells, combine them and then create a range name for a third cell in the row.

For example; for row 5420, in column C there is the word Florida, in column D there is the number 6235, and in column F there is a sentence or two. Is there a way to automatically create a named range for the cell of column F that would be named FLORIDA6235? And if so, can the macro do this for every row even if the word and/or the number changes.

I have roughly 28,000 rows and nine columns that I am working with. That's why I was wondering if there was a way to automate this. There are 10 states and I don't know how many different numbers attached to the states, however there are many state and number combinations that repeat, so there would be several rows with Florida in column C, 6235 in column D but a different description in column F.

View 9 Replies View Related

Pie Chart And N/A Ranges

Apr 29, 2009

I am trying to create a pie chart that does not include the data labels if the value is zero. I have researched on the 'web' and have been told if I get a value of #NA then these would not show as they are not considered as a value.

However using the following formula I am getting a result of #NA in the cell but this is still showing as zero in the pie chart and hence the labels.

=IF(ISBLANK(F20),NA(),H20*$H$13)

View 9 Replies View Related

Named Ranges In A Chart - .

May 30, 2007

I have a spreadsheet with 300+ questions in columns (covering 2 worksheets - rows 1 to 5), and the answers to the questions are placed in the rows beneath - column A & B lists who the answers came from.

The idea here is that on a seperate sheet a user can enter a question number (e.g: 1.2OP007) and a graph will update to show the different values given for each person who answered that question.

So, in this seperate sheet I have the question in cell $A$1.
In cell $B$1 I have this formula:.........................

View 3 Replies View Related

Chart Still Plotting Zero Value Ranges

Mar 21, 2008

My chart with dynamic ranges still plots empty ranges despite using the following for empty cells:

Use of NA()
Use of #NA
Use of ""
Use of 0

What else am I missing?

View 9 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

Using VBA To Update Chart Data - 2 Ranges

Dec 14, 2012

I am making a macro to update the data on a bunch of charts. This is what I got from the macro recorder when I selected the data manually.

Code:
Sub testthree()
ActiveWorkbook.Charts("Julian's Words").Select
ActiveChart.SetSourceData Source:=Sheets("Super Sight Chart Data").Range( _
"C1:H1,C5:H5"), PlotBy:=xlRows
End Sub

I have created the part of the macro that will go to the data table and define the two ranges I need to use.

Code:
Sub Adjust_Graphs()
Dim lastdate As String
Dim daterange As Range

[Code] .....

However, this code is selecting the entire range C1:H5. How can I get the code to take JUST the two lines I need?

Exmaple: The X axis needs to be C1:H1, and the Y axis needs to be C5:H5.

I also tried this, without success:

Code:

Dim combrange As Range
Set combrange = Union(daterange, wordrange)
ActiveWorkbook.Charts("Julian's Words").SetSourceData Source:=Sheets("Super Sight Chart Data").Range( _
combrange), PlotBy:=xlRows

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

Odd Chart: Combine Data From Multiple Worksheets And Make A Chart

Mar 26, 2009

I am trying to combine data from multiple worksheets and make a chart. I have about 200 keywords in every worksheet (about 50), and some of them repeat themselves through worksheets and some don't. For every keyword, I have an associated value in the next column that I want to portray over time (each worksheet is for a different period).

So what I need to figure out is how to be able to pick any 10 keywords from the worksheets and put them in a line chart where I can see the associated value for each period for every worksheet so I can compare my keywords' efficiency. The tricky part is that some worksheets do not contain the keyword and other worksheets contain the keyword in a different cell than the previous wsheet.

View 4 Replies View Related

Excel 2007 :: Chart Created Using Name Ranges

Jan 28, 2013

I have built a chart using dynamic nameranges. The problem that I am facing is I tested it on two systems . One system the charts works fine but the other system the charts does not work . Both are excel 2007. Now the error that I get is if I see the chart data source from one system it is showing "!". The other file shows the chart data source as "0!". What should I be checking so that it works in the other system as well?

View 6 Replies View Related

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 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

Setting Column Chart Data Using VBA For Variable Ranges

Mar 10, 2014

I have some code to plot a column chart of data but it isn't working as expecting at the moment. The code is below. The variable binCounter is a count of how many cells in a range that I want to plot on the chart.

However, what I am finding is that the first couple of cells in the range appear as the series name with the rest appearing as the data in the chart. Secondly, the chart appears with the axis labels 1,2,3 etc when I have some custom ones I would prefer to use. How do I go about setting this property, as I can only find options on setting the axis title There is a lot of stuff on XY charts on Google but I can't find much on column charts unfortunately .

VB:
'activate sheet and chart
Worksheets("Home Page").Activate
ActiveSheet.ChartObjects("Histogram").Activate

'set variables for chart
With ActiveChart

[Code] .....

View 1 Replies View Related

Calculating Chart Values Over Large Ranges With Catagories

Nov 4, 2008

I am working on a custom log file for my company. It has 3 sheets and on each sheet is a service type column with drop downs and next to it an amount coumn. Every day that a service issue is requested someone goes in and chooses the service type from the drop down and enters the amount in USD. I want to add charts to the top of each sheet and on the axis i want to have service type and then the total amount spent on that catagory.

View 4 Replies View Related

Charts - Line Chart, Show Data Ranges?

Jan 5, 2009

I have created a line chart that plots weight of a person, but want to show on the plot area what a certain range of weight represent, Ive attached images to show this concept.

View 4 Replies View Related

Change Chart Data Series (rows) Using Named Ranges?

Mar 13, 2013

I have a chart in a workbook that works fine by looking at the following data series:

=Workings!$A$2:$C$35

In the data series above...where the numbers are 2 and 35 I have named ranges "CHART_Start_Row" and "CHART_End_Row" which will change dynamically as appropriate and can replace these static numbers - but how do I incorporate these named ranges into the data series reference?

View 2 Replies View Related

Copy Multiple Ranges From Multiple Sheets And Paste In Order Via VBA

Apr 21, 2013

I've got several worksheets that all have the exact same layout that a user will enter unique information in to each worksheet. Then I've got a final worksheet that I want to have a button that the user can click and when they do, it will look to each worksheet and do the exact same process for each worksheet as follows:

It first looks to see if the worksheet is visible. If it is, I want it to copy the range A5 to K5 down until it gets to the last non-blank cell in column C. The first non blank cell that will be referenced will be C7. Then I want it to paste this information into the range A5:K5 on the final sheet named Sheet8 with the same values and keep cell formatting such as width and height, font. If the worksheet is not visible, it skips the sheet.

I want it to do this for each visible worksheet, placing the next visible worksheet info under the previous visible worksheet info. My current code as shown doesn't do that. It requires that something be inSheet8 A6 before it will even paste, then it pastes the info from A5:K5 but it doesn't do just the values nor does it keep the formatting. What I mean about not doing just the values is some of the info that needs to be copied comes from a drop down they can choose from and it copies the actual drop down menu. Also, it seems to copy all of the ranges from each sheet and paste it into just A5:K5 on Sheet8 and overwrites each other instead of pasting Sheet2 just below the information from Sheet1. So the only information shown after the entire process is completed is the information from the last visible sheet.

If Worksheets("Sheet1").Visible = True Then
Sheets("Sheet1").Range(Sheets("Sheet1").Range("A5:K5"),
Sheets("Sheet1").Range("C7").End(xlDown)).Copy
Sheets("Sheet8").Range("A5").End(xlDown)
End If

[Code]...

View 4 Replies View Related

Sum Data With Adjacent Row And Multiple 10 Number

Jan 11, 2014

I need some formula to sum data with adjacent row and multiple 10 number, For example :

name
cost
expected result

mike
5
45 = 5 + (4x10)

4 (x10)

deby
3
27 = 3 + 4 + (2x10)

4

2 (x10)

sisca
6
6

View 9 Replies View Related

Print Multiple Ranges From Multiple Sheets Userform

Jun 16, 2007

I inherited a spreadsheet that had an userform where the user checked off which 'pages' he wanted to print. The Ok button routine used if statements to run a routine for each 'page.' Here's an example of the original code for one page:

Sub Button2_Click()
Sheet7.Activate
Run "HorizontalPrintStuff" 'generic landscape pagesetup
With ActiveSheet.PageSetup 'specific pageset settings
.RightFooter = " Construction Assumptions"
.PrintArea = "CONSTRUCTION" 'the named range to print
.Zoom = False
.FitToPagesTall = 1
.FitToPagesWide = 1 'this changes depending upon the page selected
End With
ActiveSheet.PrintOut
End Sub

The problem was it printed each page as a separate print job; and if you print to adobe, you get serveral files, not one file. That and it took a long time to run.

So I tried a different tack. If the checkboxes has true, then the printarea is set to that named range. If there were more than one named range on a sheet to be printed, I consolidated them. I did this with a bunch of if statements - very cumbersome.

Sheet3.Activate
'Sheet3.ResetAllPageBreaks 'disabled due to errors
Run "HorizontalPrintStuff" 'generic landscape pagesetup
With ActiveSheet.PageSetup 'specific pageset settings
.PrintArea = "DEVBGTALL" 'the named range to print
.FitToPagesWide = 4 'this changes depending upon the
.FitToPagesTall = 1
End With

I haven't shown all the code cause it goes on for 12 sheets containing 16 different printareas.

My current muck ups are .....

1) it prints every printarea/named range on a given sheet (I took out all the if statements trying to debug everything.) Is there another conditional argument that allows for multiple 'trues'?

2) the pagebreaks in printarea/named ranges that are multiple pages (like a 48 month schedule) won't stay set. I've tried both VPageBreaks(3).Location:= and .VPageBreaks.Add Before:=

3) the Sheet1.select false argument is always adding a random sheet to the end of the print job. Don't know why.

I can do all this in a recorded macro, just not the selection userform. I've thought about copying to another sheet or hiding columns and rows then printing, but that seems just as cumbersome.

To recap, i want to print out, as one print job, multiple printareas from mulitple sheets, based upon checkbox selection on an userform.

View 6 Replies View Related

Track Changes On Multiple Selected Ranges On Multiple Sheets

Jul 6, 2007

I need to be able to track changes on selected ranges on multiple sheets, but Excel does not appear to be able to do this. It only appears to allow me to select multiple ranges on the same sheet.

is there a way to track changes on multiple selected ranges on multiple sheets

View 9 Replies View Related

Multiple Parameter Lookup For Multiple Table Ranges

Jun 15, 2008

In the attached file i have multiple tables for different types of conservatory roofs (16 of them in total). The ranges at the top and side relate to milimeter measurements and the data in the middle relate to the price for that sized conservatory roof. The table works where the two ranges intercept each other. I have a formula to do this for one of the tables only. What i would like is a way of choosing which type of roof to use (i.e. which table to use) and then to be able to input the measurements and the price to be displayed. All of this needs to be done in one query so its as user friendly as possible. i've had is to use a pivot table, i feel it is not possible to use a pivot table to do this sort if thing after research into them, although i am un-familiar in the making of them

View 4 Replies View Related

If Statement Covering Multiple Non Adjacent Cells

Aug 1, 2006

I want a message to show up if I have any of 6 selected cells empty? It basically serves as a reminder to fill in all required cells in a sheet that may be located in different cells. How can I write a formula in one cell that will look at all source cells and tel me that some are empty?

NameAgeLocation
Joe******

HeightWeightTime
******3 PM

Formula Here to verify all filled in.

View 2 Replies View Related

VLOOKUP For Multiple Ranges In Multiple Columns

Feb 21, 2013

Im trying to make a vlookup so I can say find a record where column A is >4, B is =2, C is 1.

Example - The lookup would find these 2 ranges.

7
2
3

2
6
4

[code]....

View 1 Replies View Related

Copy Non-adjacent Cells In A Row From One Spreadsheet To Adjacent Rows In Another

Jan 5, 2014

I have a workbook with 30 worksheets. Each sheet has 84 rows of data (start in 15 columns (A to O). I would like to create a summary sheet that only shows the most important data from each sheet.

The summary sheet would have 12 lines of headers and formatted crap at the top.
The Summary sheet header columns would be:

Site (A), Date (B) Health (C), Status (D), Critical (E), Task (F),
Dependencies (G), Owner (H), T-Date (I), Task Date (J), Mitigation Date (I)

The data in the sheets are not in that order, of course.

That
1. puts the name of the sheet I am copying from in column A
2. the deadline date in Column B (that date is always in C10 of each worksheet)
3. and copies Cells from Column A,B,G,H,I,O in any row in which the value in A is not "good" into columns C through H. I would like to paste those rows into the summary sheet. I have code that loops through the sheets and rows in each sheet to find the rows to copy. I can copy cell values directly from the active sheet to the summary sheet, but because I am copying a cell at a time, it takes 7 minutes. Yes I am impatient :)

Here is the code snippet where the copying is done:

Dim sh As Worksheet 'current worksheet
Dim DestSh As Worksheet 'worksheet in which to paste summary
Dim Last As Long
Dim CopyRow As Long 'row to copy
Dim LastCopyRow As Long

[Code] ........

ExitTheSub:

Application.Goto Sheets("KMARollup").Cells(1)
End Sub

I think there must be a way to use ranges to build an array of cell values and paste only once but I am lost here.

View 2 Replies View Related

Create Multiple Text Files From Cells & Save As Name In Adjacent Cell

Jun 26, 2008

I have two columns one of which has filenames and the other having values. I need to creating a macro that takes each value from a cell outputs it into a text file and then saves it with the filename of the cell next to the value. I'll need it to go down the columns and create separate text files for each.

View 7 Replies View Related

How To Set Multiple Ranges

Feb 1, 2014

I have set following ranges:

[Code] ....

I use above rngData1 as follows:

[Code] ....

How can I use all above ranges in For Each statement?

For example For Each rngRow In .Range(rngData1+rngData2+rngData3+rngData4).Rows

View 3 Replies View Related

IF Function With Multiple Ranges?

May 18, 2014

I am trying to create an IF function and how to create it for multiple ranges. The for the following criteria is what I am trying to work with: If a checking balance is $500 dollars or below return "low", If it is between 500 and 2000 return "Medium", and IF greater than 2000 return "high"

View 2 Replies View Related

Count In Multiple Ranges

Mar 12, 2009

look at the formulas in column cells G28..G33 and tell me where I went wrong.I have attached the file.

View 2 Replies View Related

IF Formulas With Multiple Ranges

May 31, 2009

I am trying to combine three IF formulas that depend on ranges that vary. I think the attached sheet does a much better job of explaining what I am looking for than I can do.

View 3 Replies View Related

Average Of Multiple Ranges

Jun 2, 2009

I have a list of grade from 2~4 (i have long list but for sample i made it short). I want to get average of all grades one by one as well as by making some groups. Like 2,3, "2~4" (all groups) then "3~4". All the things were going nicely with a drop down menu. But when i put average on grde "3~4" only then the problem occurred. Although I've done my work but still I think there must be some improvements.....

View 6 Replies View Related







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