A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Charts and Charting
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Realtime Graph



 
 
Thread Tools Display Modes
  #1  
Old August 30th, 2009, 11:52 AM posted to microsoft.public.excel.charting
Alectrical
external usenet poster
 
Posts: 39
Default Realtime Graph

Hi

I have a cell with a DDE link from another program, which is sample data I
need to produce a real time graph of.

To do this I need to copy the value of the cell, A1, and paste it into B1, a
second later I need to copy the value of A1 into B2 and so on. I can then
produce a real time graph from the information in column B.

Any ideas

Thanks in advance.
Alec

  #2  
Old August 30th, 2009, 01:43 PM posted to microsoft.public.excel.charting
Alectrical
external usenet poster
 
Posts: 39
Default Realtime Graph

Sorry, it should read:

I have a cell with a DDE link from another program, which is sample data I
need to produce a real time graph of.

To do this I need to copy the value of the cell, A1, and paste it into B1,
when the cell value changes I need to copy the new value from A1 into B2 and
so on. I can then produce a real time graph from the information in column B.


Sorry, it should read
"Alectrical" wrote:

Hi

I have a cell with a DDE link from another program, which is sample data I
need to produce a real time graph of.

To do this I need to copy the value of the cell, A1, and paste it into B1, a
second later I need to copy the value of A1 into B2 and so on. I can then
produce a real time graph from the information in column B.

Any ideas

Thanks in advance.
Alec

  #3  
Old September 1st, 2009, 11:40 AM posted to microsoft.public.excel.charting
John Mansfield
external usenet poster
 
Posts: 218
Default Realtime Graph

This VBA macro should work. Copy the following procedure to the sheet module
in which your data resides . . .

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim Rng As Range
Set Rng = Range("B65536").End(xlUp)
If Not Intersect(Target, Range("A1")) Is Nothing Then
Rng.Offset(1, 0).Value = Range("A1").Value
End If
End Sub

--
John Mansfield
http://www.cellmatrix.net


"Alectrical" wrote:

Sorry, it should read:

I have a cell with a DDE link from another program, which is sample data I
need to produce a real time graph of.

To do this I need to copy the value of the cell, A1, and paste it into B1,
when the cell value changes I need to copy the new value from A1 into B2 and
so on. I can then produce a real time graph from the information in column B.


Sorry, it should read
"Alectrical" wrote:

Hi

I have a cell with a DDE link from another program, which is sample data I
need to produce a real time graph of.

To do this I need to copy the value of the cell, A1, and paste it into B1, a
second later I need to copy the value of A1 into B2 and so on. I can then
produce a real time graph from the information in column B.

Any ideas

Thanks in advance.
Alec

  #4  
Old September 1st, 2009, 11:54 AM posted to microsoft.public.excel.charting
John Mansfield
external usenet poster
 
Posts: 218
Default Realtime Graph

I apologize. Here's a slight modification to the code I just posted.

Option Explicit

Private Sub Worksheet_Change(ByVal Target As Excel.Range)

Dim Rng As Range

Set Rng = Range("B65536").End(xlUp)

If Not Intersect(Target, Range("A1")) Is Nothing Then
If Range("B1").Value = vbNullString Then
Range("B1").Value = Range("A1").Value
Else
Rng.Offset(1, 0).Value = Range("A1").Value
End If
End If

End Sub

--
John Mansfield
http://www.cellmatrix.net


"Alectrical" wrote:

Sorry, it should read:

I have a cell with a DDE link from another program, which is sample data I
need to produce a real time graph of.

To do this I need to copy the value of the cell, A1, and paste it into B1,
when the cell value changes I need to copy the new value from A1 into B2 and
so on. I can then produce a real time graph from the information in column B.


Sorry, it should read
"Alectrical" wrote:

Hi

I have a cell with a DDE link from another program, which is sample data I
need to produce a real time graph of.

To do this I need to copy the value of the cell, A1, and paste it into B1, a
second later I need to copy the value of A1 into B2 and so on. I can then
produce a real time graph from the information in column B.

Any ideas

Thanks in advance.
Alec

  #5  
Old September 1st, 2009, 12:22 PM posted to microsoft.public.excel.charting
Alectrical
external usenet poster
 
Posts: 39
Default Realtime Graph

Thanks John,

However, I could not get it to work. I created a module as you suggested and
pasted the code in. My link in A1 is changing every second, but I am getting
nothing in column B.

Including "Option Explicit" also makes no difference.

The version of excel I am running is 2003.



"John Mansfield" wrote:

I apologize. Here's a slight modification to the code I just posted.

Option Explicit

Private Sub Worksheet_Change(ByVal Target As Excel.Range)

Dim Rng As Range

Set Rng = Range("B65536").End(xlUp)

If Not Intersect(Target, Range("A1")) Is Nothing Then
If Range("B1").Value = vbNullString Then
Range("B1").Value = Range("A1").Value
Else
Rng.Offset(1, 0).Value = Range("A1").Value
End If
End If

End Sub

--
John Mansfield
http://www.cellmatrix.net


"Alectrical" wrote:

Sorry, it should read:

I have a cell with a DDE link from another program, which is sample data I
need to produce a real time graph of.

To do this I need to copy the value of the cell, A1, and paste it into B1,
when the cell value changes I need to copy the new value from A1 into B2 and
so on. I can then produce a real time graph from the information in column B.


Sorry, it should read
"Alectrical" wrote:

Hi

I have a cell with a DDE link from another program, which is sample data I
need to produce a real time graph of.

To do this I need to copy the value of the cell, A1, and paste it into B1, a
second later I need to copy the value of A1 into B2 and so on. I can then
produce a real time graph from the information in column B.

Any ideas

Thanks in advance.
Alec

  #6  
Old September 1st, 2009, 05:45 PM posted to microsoft.public.excel.charting
Alectrical
external usenet poster
 
Posts: 39
Default Realtime Graph

On running debug, I get Target is empty

"John Mansfield" wrote:

I apologize. Here's a slight modification to the code I just posted.

Option Explicit

Private Sub Worksheet_Change(ByVal Target As Excel.Range)

Dim Rng As Range

Set Rng = Range("B65536").End(xlUp)

If Not Intersect(Target, Range("A1")) Is Nothing Then
If Range("B1").Value = vbNullString Then
Range("B1").Value = Range("A1").Value
Else
Rng.Offset(1, 0).Value = Range("A1").Value
End If
End If

End Sub

--
John Mansfield
http://www.cellmatrix.net


"Alectrical" wrote:

Sorry, it should read:

I have a cell with a DDE link from another program, which is sample data I
need to produce a real time graph of.

To do this I need to copy the value of the cell, A1, and paste it into B1,
when the cell value changes I need to copy the new value from A1 into B2 and
so on. I can then produce a real time graph from the information in column B.


Sorry, it should read
"Alectrical" wrote:

Hi

I have a cell with a DDE link from another program, which is sample data I
need to produce a real time graph of.

To do this I need to copy the value of the cell, A1, and paste it into B1, a
second later I need to copy the value of A1 into B2 and so on. I can then
produce a real time graph from the information in column B.

Any ideas

Thanks in advance.
Alec

  #7  
Old September 1st, 2009, 05:46 PM posted to microsoft.public.excel.charting
Alectrical
external usenet poster
 
Posts: 39
Default Realtime Graph

On running Debug, I get the error Target is empty

"John Mansfield" wrote:

I apologize. Here's a slight modification to the code I just posted.

Option Explicit

Private Sub Worksheet_Change(ByVal Target As Excel.Range)

Dim Rng As Range

Set Rng = Range("B65536").End(xlUp)

If Not Intersect(Target, Range("A1")) Is Nothing Then
If Range("B1").Value = vbNullString Then
Range("B1").Value = Range("A1").Value
Else
Rng.Offset(1, 0).Value = Range("A1").Value
End If
End If

End Sub

--
John Mansfield
http://www.cellmatrix.net


"Alectrical" wrote:

Sorry, it should read:

I have a cell with a DDE link from another program, which is sample data I
need to produce a real time graph of.

To do this I need to copy the value of the cell, A1, and paste it into B1,
when the cell value changes I need to copy the new value from A1 into B2 and
so on. I can then produce a real time graph from the information in column B.


Sorry, it should read
"Alectrical" wrote:

Hi

I have a cell with a DDE link from another program, which is sample data I
need to produce a real time graph of.

To do this I need to copy the value of the cell, A1, and paste it into B1, a
second later I need to copy the value of A1 into B2 and so on. I can then
produce a real time graph from the information in column B.

Any ideas

Thanks in advance.
Alec

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:42 PM.


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