Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
sslack
 
Posts: n/a
Default Plotting Line Graph of Dynamic Data


I have an excel spreadsheet which is linked to a data source (via DDE)
and is constantly feeding a single cell different values.

Is it possible to plot a line graph of the value in the cell everytime
it changes?

For example,
The current cell value is 10.00 and the time is 9:00am. Now the time
is 9:15am and the value just changed to 10.25. I want to plot a line
graph that displays the time on the x-axis and the value on the
y-axis.

Please let me know if you can help out. I have been pulling my hair
out trying to figure this out.

Best,
Steve


--
sslack
------------------------------------------------------------------------
sslack's Profile: http://www.excelforum.com/member.php...o&userid=16442
View this thread: http://www.excelforum.com/showthread...hreadid=376600

  #2   Report Post  
Tushar Mehta
 
Posts: n/a
Default

You would have to save all the old values. That would require a
programmatic solution.

The following untested code should go in the worksheet code module. It
assumes that the DDE link updates a cell in column B, say B2.

Private Sub Worksheet_Change(ByVal Target As Range)
Dim EmptyCell As Range
If Target.Column < 2 Then Exit Sub
With Target.Parent
Set EmptyCell = _
.Cells(.Rows.Count, Target.Column).End(xlUp).Offset(1, 0)
End With
On Error GoTo ErrXIT
Application.EnableEvents = False
EmptyCell.Value = Target.Validation
EmptyCell.Offset(0, -1).Value = Now()
ErrXIT:
Application.EnableEvents = True
End Sub

You can now use the ideas at Dynamic Charts (http://www.tushar-
mehta.com/excel/newsgroups/dynamic_charts/index.html) to create a chart
that updates itself automatically.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...

I have an excel spreadsheet which is linked to a data source (via DDE)
and is constantly feeding a single cell different values.

Is it possible to plot a line graph of the value in the cell everytime
it changes?

For example,
The current cell value is 10.00 and the time is 9:00am. Now the time
is 9:15am and the value just changed to 10.25. I want to plot a line
graph that displays the time on the x-axis and the value on the
y-axis.

Please let me know if you can help out. I have been pulling my hair
out trying to figure this out.

Best,
Steve


--
sslack
------------------------------------------------------------------------
sslack's Profile:
http://www.excelforum.com/member.php...o&userid=16442
View this thread: http://www.excelforum.com/showthread...hreadid=376600


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
GRAPH data labels gunga Excel Discussion (Misc queries) 4 May 13th 05 03:01 PM
Line Graph Data Recognition Nat Charts and Charting in Excel 2 April 30th 05 02:07 PM
Line Drawing Between Separated Data Points ? Robert11 Charts and Charting in Excel 2 April 28th 05 11:11 AM
plotting a single line graph plotting graphg New Users to Excel 0 February 26th 05 10:21 PM
Plotting moving average line on a chart Herbert Chan Charts and Charting in Excel 1 February 26th 05 08:31 PM


All times are GMT +1. The time now is 02:21 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"