ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Recording the 1st Change in the value of a cell (https://www.excelbanter.com/excel-programming/327101-recording-1st-change-value-cell.html)

Carl

Recording the 1st Change in the value of a cell
 

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 - it comes from a live data feed.

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

like so - and continues to change as subsequent trades occur.

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.


Fredrik Wahlgren

Recording the 1st Change in the value of a cell
 

"carl" wrote in message
...

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 - it comes from a live data

feed.

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

like so - and continues to change as subsequent trades occur.

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.


I would use the Worksheet_Change event and place a timestamp in Col C, same
row, whenever a new value has been entered in Column B. What about the
subsequent trades? You could check if the appropriate cell in col C is empty
if you want to track the first trade only.

I'm not sure this event would work as expected in this scenario. Can you
please describe the live data feed.

/Fredrik



Carl

Recording the 1st Change in the value of a cell
 
thank you for the reply.

I only want to track the first trade.

The data feed is a DDE Link to Thompson (ILX). Every time a trade occurs,
the value changes. I only want to record the first vallue (the first trade of
the day).

Will the solution you propose only record in ColC that first change in the
ColB's value or will it record all subsequent change.

Also, I'm trying to track 500 stocks.

Best Regards.

"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 - it comes from a live data feed.

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

like so - and continues to change as subsequent trades occur.

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.


Fredrik Wahlgren

Recording the 1st Change in the value of a cell
 

"carl" wrote in message
...
thank you for the reply.

I only want to track the first trade.

The data feed is a DDE Link to Thompson (ILX). Every time a trade occurs,
the value changes. I only want to record the first vallue (the first trade

of
the day).

Will the solution you propose only record in ColC that first change in the
ColB's value or will it record all subsequent change.

Also, I'm trying to track 500 stocks.

Best Regards.


I have found a link that relates to this problem. It does use the
Worksheet_Change event and it enters a timestamp in a cell. In your case,
you first need to check the cell where the change happened, it should be in
column B. If the change happens in say B20, you need to check if C20 is
empty. If it is, insert the timestamp. This means that only the first change
is tracked.

Actually, the very first thing you need to do is yo make sure that the the
event is triggered by the DDE link as something is changed

http://www.mcgimpsey.com/excel/timestamp.html

/Fredrik




All times are GMT +1. The time now is 07:49 PM.

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