Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
David_J
 
Posts: n/a
Default History for Realtime measurement


Hello all,

I have a question about copying a value from one cell to another row.

I'm having realtime measurement coming into excel from a flowmeter.
The connection is made with DDE.

All is going well but I have only one cell that gets an update every
second or so. Value in the cell is between 0.0000 and 2.0000 and
depends on the flow in the flowmeter.
I want to store the information from that realtimecell to the next row
to be able to create a graph.

How do I copy (automatic) that cell to a row so I can have some history
from that realtime measurement?


--
David_J
------------------------------------------------------------------------
David_J's Profile: http://www.excelforum.com/member.php...o&userid=34827
View this thread: http://www.excelforum.com/showthread...hreadid=545792

  #2   Report Post  
Posted to microsoft.public.excel.misc
mrice
 
Posts: n/a
Default History for Realtime measurement


I would suggest a macro linked to the worksheet_change event

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = Range("A1").Address Then
Cells(65536, 3).End(xlUp).Offset(1, 0) = Target
End If
End Sub

assuming that the cell that is changing is A1


--
mrice

Research Scientist with many years of spreadsheet development experience
------------------------------------------------------------------------
mrice's Profile: http://www.excelforum.com/member.php...o&userid=10931
View this thread: http://www.excelforum.com/showthread...hreadid=545792

  #3   Report Post  
Posted to microsoft.public.excel.misc
David_J
 
Posts: n/a
Default History for Realtime measurement


Thanks mrice,

It works very good.

Now it copy's the A1 cell everytime it changes to B1 then B2 then B...
Is it possible to assing a time to the copy action?
Like every 10 seconds one copy (1 minute would result in B1 B6)
This would be better to create a graph because the time is known.
A test runs could last for 14 hours with a flow (A1) that changes
constant.
The result now is a lot of data...

It would be even better if it was possible to change the time (one copy
every 10 sec or one every minute) in another cell (C1?).

Thanks,

David.


--
David_J
------------------------------------------------------------------------
David_J's Profile: http://www.excelforum.com/member.php...o&userid=34827
View this thread: http://www.excelforum.com/showthread...hreadid=545792

  #4   Report Post  
Posted to microsoft.public.excel.misc
mrice
 
Posts: n/a
Default History for Realtime measurement


Try this

Public RunWhen As Double

Sub Capture()
Cells(1, 1).Copy Destination:=Cells(65536, 2).End(xlUp).Offset(1,
0)
RunWhen = Now + TimeSerial(0, 0, Cells(1, 3))
Application.OnTime RunWhen, "Capture", , True
End Sub


--
mrice

Research Scientist with many years of spreadsheet development experience
------------------------------------------------------------------------
mrice's Profile: http://www.excelforum.com/member.php...o&userid=10931
View this thread: http://www.excelforum.com/showthread...hreadid=545792

  #5   Report Post  
Posted to microsoft.public.excel.misc
David_J
 
Posts: n/a
Default History for Realtime measurement


mrice,

Perfect!
It works like a dream.
Thanks!!!!

Gr, David.


--
David_J
------------------------------------------------------------------------
David_J's Profile: http://www.excelforum.com/member.php...o&userid=34827
View this thread: http://www.excelforum.com/showthread...hreadid=545792

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
making a time a measurement of time, not an hour of the day?? small tom Excel Discussion (Misc queries) 7 January 24th 06 02:17 PM
cant not change history on a shared workbook cyndi Excel Discussion (Misc queries) 0 December 15th 05 08:14 PM
Merge files blocked by change history and "sufficient amount of ti GeoObject Excel Discussion (Misc queries) 1 November 19th 05 09:11 PM
Excel Should Have a History Function. Ray M. Excel Worksheet Functions 2 September 23rd 05 08:03 AM
How do I stop Excel 2000 from saving file history from file that . Cathy Excel Discussion (Misc queries) 0 March 29th 05 03:27 PM


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