Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 104
Default Macro with line graph

Dear,

I have huge data with different headers. I want to plot a single line graph
linked with a validation with the list of all the headers. The data in the
line graph should reflect only the selected header among the list.

For example, In the below example i should have a button command with the
validation list of all the three headers below apples, oranges and grapes.

By selecting oranges in the list, the line graph should pick only the data
from colA and colC.. like wise

ColA ColB ColC Cold
Row1 Time Apples Oranges Grapes
Row2 12:00 5 3 4
Row3 13:00 7 2 6
Row4 14:00 9 6 7
Row5 15:00 5 2 8
Row6 16:00 3 1 9

Please help me.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default Macro with line graph

Check out Jon Peltier's articles on dynamic charting:

http://peltiertech.com/Excel/Charts/Dynamics.html
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Sasikiran" wrote:

Dear,

I have huge data with different headers. I want to plot a single line graph
linked with a validation with the list of all the headers. The data in the
line graph should reflect only the selected header among the list.

For example, In the below example i should have a button command with the
validation list of all the three headers below apples, oranges and grapes.

By selecting oranges in the list, the line graph should pick only the data
from colA and colC.. like wise

ColA ColB ColC Cold
Row1 Time Apples Oranges Grapes
Row2 12:00 5 3 4
Row3 13:00 7 2 6
Row4 14:00 9 6 7
Row5 15:00 5 2 8
Row6 16:00 3 1 9

Please help me.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Macro with line graph

How about one that uses a double click on the desired column without the
need for the drop down?
Right click sheet tabview codeinsert this
Or, send your file to my address below.

Private Sub Worksheet_BeforeDoubleClick _
(ByVal Target As Range, Cancel As Boolean)
ac = Target.Column
ms = ActiveSheet.Name

With Sheets(ms).ChartObjects(1).Chart
..SeriesCollection(1).Values = _
Range(Cells(2, ac), Cells(6, ac))
..ChartTitle.Text = Cells(1, ac)
End With
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Sasikiran" wrote in message
...
Dear,

I have huge data with different headers. I want to plot a single line
graph
linked with a validation with the list of all the headers. The data in the
line graph should reflect only the selected header among the list.

For example, In the below example i should have a button command with the
validation list of all the three headers below apples, oranges and grapes.

By selecting oranges in the list, the line graph should pick only the data
from colA and colC.. like wise

ColA ColB ColC Cold
Row1 Time Apples Oranges Grapes
Row2 12:00 5 3 4
Row3 13:00 7 2 6
Row4 14:00 9 6 7
Row5 15:00 5 2 8
Row6 16:00 3 1 9

Please help me.


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
Create a macro to create excel line graph with coloured pointers anddata lables anuj datta Charts and Charting in Excel 1 September 30th 09 04:04 PM
How to convert a dotted line to a solid line in a line graph Sharlz Charts and Charting in Excel 1 January 14th 09 04:51 AM
How do I graph data daily as a line graph across a calendar format Glani Charts and Charting in Excel 3 November 23rd 07 09:05 AM
Cluster stacked graph AND line combo graph? [email protected] Charts and Charting in Excel 6 October 14th 06 12:33 AM
macro to print line graph from data in cells WSIB#1 Excel Discussion (Misc queries) 0 February 18th 05 01:19 AM


All times are GMT +1. The time now is 08:36 PM.

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"