ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Recording the First Change of a Cell Value (https://www.excelbanter.com/excel-worksheet-functions/21134-recording-first-change-cell-value.html)

carl

Recording the First Change of a Cell Value
 
I have a spread sheet that looks like so before the start
of the trading day:

ColA ColB ColC
ABC 4/7/2005

ColB tracks the trade time of stock ABC.

When ABC does it's first trade, the spreadsheet looks

like so:

ColA ColB ColC
ABC 9:32:28AM

Is there a macro that will record the time of the first trade and place it in ColC ??


Thank you in advance.


Duke Carey

Carl -

How does that cell get updated?

If it's from a live feed from some online data source, then you probably
ought to post this in the Excel.Programming NG where you may find an answer.

If it's updated manually, then you need only write a worksheet change event.
Something like

Private Sub Worksheet_Change(ByVal Target As Range)
With Target
If .Column = 2 And .Row = 5 Then .Offset(0, 1).Value = Target.Value
End With
End Sub




"carl" wrote:

I have a spread sheet that looks like so before the start
of the trading day:

ColA ColB ColC
ABC 4/7/2005

ColB tracks the trade time of stock ABC.

When ABC does it's first trade, the spreadsheet looks

like so:

ColA ColB ColC
ABC 9:32:28AM

Is there a macro that will record the time of the first trade and place it in ColC ??


Thank you in advance.



All times are GMT +1. The time now is 03:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com