Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
S S is offline
external usenet poster
 
Posts: 1
Default how to track a change in a cell content

Dear All,

I have a problem with an excel application. I am using an excel add-in
written by someone else, I do not have access to the code (it is in a
dll). The add-in connects to some machines that we have here in the
labs. The machines are in a network.
In the cells of an excel workbook, I can monitor the temperature of
the machines in the labs during the experiments and get warning
signals if anything goes wrong.
My problem is that I would like to track the temperature of the
machines in a database. Actually, I would like to record temperature
changes in the database. An example of what I mean will make things
clear.

Let's say that I have the following time series (time in seconds and
temperature in Celsius):

time temperature
00001 200
00002 200
00003 202
00004 200
00005 200
00006 203
00007 203
00008 200
00009 200
00010 200

What I want to store in the database is the following:

time temperature
00001 200
00003 202
00004 200
00006 203
00008 200

which is what gets displayed in the Excel cell.

I know how to copy a value from a cell to another (or to an Access
database), what I do not know is to code in VBA the following: "when
the content of this cell changes, then copy it to the other location".

I tried the following:

Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
MsgBox ("A1 has changed")
End If
End Sub

but in my case is not appropriate because it works if the cell content
is changed by the user only.

Has any of you got an idea of how to do it?

I thank you in advance for your time.

S
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default how to track a change in a cell content

S,

Put a formula in another cell that links to the cell being changed. When
that cell updates, it should force a calculate event, which you can then
use.

HTH,
Bernie
MS Excel MVP

"S" wrote in message
m...
Dear All,

I have a problem with an excel application. I am using an excel add-in
written by someone else, I do not have access to the code (it is in a
dll). The add-in connects to some machines that we have here in the
labs. The machines are in a network.
In the cells of an excel workbook, I can monitor the temperature of
the machines in the labs during the experiments and get warning
signals if anything goes wrong.
My problem is that I would like to track the temperature of the
machines in a database. Actually, I would like to record temperature
changes in the database. An example of what I mean will make things
clear.

Let's say that I have the following time series (time in seconds and
temperature in Celsius):

time temperature
00001 200
00002 200
00003 202
00004 200
00005 200
00006 203
00007 203
00008 200
00009 200
00010 200

What I want to store in the database is the following:

time temperature
00001 200
00003 202
00004 200
00006 203
00008 200

which is what gets displayed in the Excel cell.

I know how to copy a value from a cell to another (or to an Access
database), what I do not know is to code in VBA the following: "when
the content of this cell changes, then copy it to the other location".

I tried the following:

Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
MsgBox ("A1 has changed")
End If
End Sub

but in my case is not appropriate because it works if the cell content
is changed by the user only.

Has any of you got an idea of how to do it?

I thank you in advance for your time.

S



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
Change Cell Content George Excel Discussion (Misc queries) 2 March 16th 09 02:40 PM
Change format of cell content Dias Excel Discussion (Misc queries) 2 January 22nd 09 06:59 AM
change content of a given cell as different cells are indicated sarah Excel Worksheet Functions 1 May 21st 08 02:41 PM
how do I change the content of one cell based on another? Barry Excel Discussion (Misc queries) 2 September 3rd 06 10:16 AM
Change picture according to cell content paulma Excel Programming 3 September 26th 03 11:18 PM


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