473,326 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Creating charts

1
Hi,

I want to create charts in Excel and I have different matrices (ranges).

Range("K2:P14").Select
Charts.Add
ActiveChart.ChartType = xlLineMarkers
ActiveChart.SetSourceData Source:=Sheets("Plan2").Range("K2:P14")
ActiveChart.Location Where:=xlLocationAsObject, Name:="Plan2"
ActiveChart.PlotArea.Select
ActiveChart.SeriesCollection(1).XValues = "=Plan2!R3C10:R16C10"
ActiveChart.SeriesCollection(2).XValues = "=Plan2!R3C10:R16C10"
ActiveChart.SeriesCollection(3).XValues = "=Plan2!R3C10:R16C10"
ActiveChart.SeriesCollection(4).XValues = "=Plan2!R3C10:R16C10"
ActiveChart.SeriesCollection(5).XValues = "=Plan2!R3C10:R16C10"
ActiveChart.SeriesCollection(6).XValues = "=Plan2!R3C10:R16C10"
With ActiveChart
.HasTitle = True
.ChartTitle.Characters.Text = "Geral"
End With

That´s the routine to create one chart, but I need to create a lot more (using the command for next). To work with "for", I need to use Cells( i , j ).
I´ve tried Range(Cells(x,x) , Cells(y,y)).
Example:
ActiveChart.SetSourceData Source:=Plan2.Range(Cells(j * 15 + 2, colun + 2), Cells(j * 15 + 14, colun + anos + 1))

But that doesn´t work, it´s not looping.

Anyone can help?
Aug 26 '08 #1
0 1091

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Thomas Guettler | last post by:
Hi! I need to create some simple charts with python. A list contains integers between 0 and mymax. I want to see how the values are distributed (How many are 0, how many are mymax, ...). The...
1
by: Alan | last post by:
Hi there, Are there Excel charting gurus here?? If so then please read on... Sorry for the cross-post but I'm not familiar with the Excel groups. I've posted to asp.general because if I have...
5
by: Alan | last post by:
Hi there, Are there Excel charting gurus here?? If so then please read on... Sorry for the cross-post but I'm not familiar with the Excel groups. I've posted to asp.general because if I have...
3
by: vanisathish | last post by:
Hi All, Is there a way to draw charts from SQL Server Data using ASP.?Is it possible to use the SQL Reporting Services using ASp
9
by: Patrick.O.Ige | last post by:
I have a code below and its a PIE & BAR CHART. The values now are all static but I want to be able to pull the values from a database. Can you guys give me some ideas to do this? Thanks ...
1
by: Al Bahr | last post by:
Hi, Anyone aware of sample codes or article on creating Charts such as line, or Bar in VB.net? Thanks Al
3
by: implicate_order | last post by:
Greetings, I'm new to python and am in the process of writing a script to parse some CSV data, spread it across multiple Excel worksheets and then generate charts. I searched the internet to...
0
by: Ric | last post by:
I have a mandate from a customer to create custom bubble and gannt charts that are viewable in their Web browser. We explored some of the charting tools and controls but because of the complexity...
2
Chittaranjan
by: Chittaranjan | last post by:
Hi All, In PHP I want to create a graph by getting the data from database so I have looked in some sites like - http://www.maani.us/charts/index.php?menu=Gallery -...
0
by: crysallis | last post by:
Hi all, i am trying to automate multiple charts by manipulating macros. i have data on 17 different sheets and wish to create a chart for the same data range in each sheet. Problem is i keep...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.