Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro for Graphing Data


I am looking for a macro that would allow me to select several columns
of data and create identically sized graphs within excel on the same
sheet. I have tried several options and nothing seems to work. Any
assistance would be great. Thanks

Erica


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro for Graphing Data


After reading the message, I think that I might need to provide
additional information. What I am looking to do is the following:

I have 3 to 4 columns of data, usually no more than 13 rows worth (i.e.
columns a-d, rows 1-13). This I need a graph that will be based upon
each individual column, so a total of 4 graphs by they must all be
identical in size. Trying to do this manually gets to be a headache.
Because the data can range so drastically, thus throwing the axis size
off. Is there a way that I can do this?


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,979
Default Macro for Graphing Data

Jon Peltier has a sample file that may help you:


http://www.geocities.com/jonpeltier/...tCreation.html


Newdlj wrote:
After reading the message, I think that I might need to provide
additional information. What I am looking to do is the following:

I have 3 to 4 columns of data, usually no more than 13 rows worth (i.e.
columns a-d, rows 1-13). This I need a graph that will be based upon
each individual column, so a total of 4 graphs by they must all be
identical in size. Trying to do this manually gets to be a headache.
Because the data can range so drastically, thus throwing the axis size
off. Is there a way that I can do this?


--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 90
Default Macro for Graphing Data

Here's a sample macro to get you started. Select a range and it will
work on that range; select a cell and it will work on the entire current
region of the range, the contiguous range containing data. It makes one
chart for each column in the range, and puts each chart lower than the
last so they don't all overlap.

Sub MakeCharts()
Dim myRange As Range
Dim myChartOb As ChartObject
Dim iColCt As Integer
Dim iColIx As Integer
Dim ht As Integer
Dim wd As Integer

ht = 200 ' Chart height
wd = 275 ' Chart width
If TypeName(Selection) = "Range" Then
If Selection.Cells.Count = 1 Then
Set myRange = Selection.CurrentRegion
Else
Set myRange = Selection
End If
iColCt = myRange.Columns.Count
For iColIx = 1 To iColCt
Set myChartOb = ActiveSheet.ChartObjects.Add _
(myRange.Left + myRange.Width, _
myRange.Top + (iColIx - 1) * ht, wd, ht)
With myChartOb.Chart
.SetSourceData myRange.Columns(iColIx)
' include other embellishments he
' titles, chart type, series formatting
' fonts, colors, etc.
End With
Next
Else
MsgBox "Select a cell in your target range and try again."
End If
End Sub

- Jon
-------
Jon Peltier, Microsoft Excel MVP
http://www.geocities.com/jonpeltier/Excel/index.html
_______


Newdlj wrote:

After reading the message, I think that I might need to provide
additional information. What I am looking to do is the following:

I have 3 to 4 columns of data, usually no more than 13 rows worth (i.e.
columns a-d, rows 1-13). This I need a graph that will be based upon
each individual column, so a total of 4 graphs by they must all be
identical in size. Trying to do this manually gets to be a headache.
Because the data can range so drastically, thus throwing the axis size
off. Is there a way that I can do this?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Graphing Data Rich Hayes Charts and Charting in Excel 2 November 21st 07 02:17 PM
graphing using macro misschanda via OfficeKB.com Charts and Charting in Excel 2 September 7th 07 04:04 PM
Macro for graphing jrussl Charts and Charting in Excel 1 June 15th 06 02:24 AM
Help with graphing log data Petrov27 Charts and Charting in Excel 2 January 19th 05 09:17 PM
Dynamic range in graphing macro Colin Macleod Excel Programming 2 November 1st 03 06:26 AM


All times are GMT +1. The time now is 06:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"