Can I graph an auto updating cell

  • Thread starter Thread starter safe.store.file
  • Start date Start date
S

safe.store.file

I have a sheet with cells auto updating there contents by linking to a
data source out of excel
can I use them as data source for a graph and how?

Or saving them in another sheet by time for instance:
time cell value
09:00:00 56
09:00:01 54
..............
............
Reply With Quote
 
I have a sheet with cells auto updating there contents by linking to a
data source out of excel
can I use them as data source for a graph and how?

Or saving them in another sheet by time for instance:
time cell value
09:00:00 56
09:00:01 54

Some kind of DDE link?

This is generally done by capturing the Worksheet_Calculate event when the
linked cell updates, then saving the value with a time stamp in another
range. This range can then be plotted.
Reply With Quote

If you'd like a proposal, follow up to my email address:

jon at peltiertech dot com

- Jon
 
Some kind of DDE link?

This is generally done by capturing the Worksheet_Calculate event when the
linked cell updates, then saving the value with a time stamp in another
range. This range can then be plotted.


If you'd like a proposal, follow up to my email address:

jon at peltiertech dot com

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. -http://PeltierTech.com
_______
Thanks Jon Peltier,

Yes it's a dde link

This is generally done by capturing the Worksheet_Calculate event when
the
linked cell updates, then saving the value with a time stamp in another
range. This range can then be plotted.

That's exactly what i need ; but how to do it?
Is it a direct or require some tempering ?
 
It's not too difficult. I usually put a formula in an unused cell that
points to the cell with the link (like =B3) so that the change in the link
initiates a worksheet recalc. I use a sheet event to act on the recalc.
Right click the sheet tab, choose View Code. At the top of the code module
that pops up in the VBE, select Worksheet from the left hand dropdown, and
Calculate from the right hand dropdown. This code outline appears in the
code window:

Private Sub Worksheet_Calculate()

End Sub

Let's say you're taking the value in cell B3, and storing it in column F,
and the time in column E. This is the code you would use:

Private Sub Worksheet_Calculate()
Dim iRow as Long

iRow = Me.Range("F65536").End(xlUp).Row
Me.Range("E1:F1").Offset(iRow).Value = Array(Now, Me.Range("B3").Value
End Sub

Of course, a little validation and error proofing would help as well.

- Jon
 
It's not too difficult. I usually put a formula in an unused cell that
points to the cell with the link (like =B3) so that the change in the link
initiates a worksheet recalc. I use a sheet event to act on the recalc.
Right click the sheet tab, choose View Code. At the top of the code module
that pops up in the VBE, select Worksheet from the left hand dropdown, and
Calculate from the right hand dropdown. This code outline appears in the
code window:

Private Sub Worksheet_Calculate()

End Sub

Let's say you're taking the value in cell B3, and storing it in column F,
and the time in column E. This is the code you would use:

Private Sub Worksheet_Calculate()
Dim iRow as Long

iRow = Me.Range("F65536").End(xlUp).Row
Me.Range("E1:F1").Offset(iRow).Value = Array(Now, Me.Range("B3").Value
End Sub

Of course, a little validation and error proofing would help as well.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. -http://PeltierTech.com
_______

Jon, thank you very much for your help
clear and simple
I'll try it
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top