Inserting multiple now-times automatically

P

Plexx

Hi,

I have got an instrument that produces ASCII-data linked to an Exce
spreadsheet via serial communication. Every time that my instrumen
sends a string of data, I want excel to generate a date and time stamp
The data I sent is spread over 2 colums.
I've tried this formula in the third colum :
IF(A1<>B1,NOW(),"")
It worked, BUT
Every time I enter a new row of date, it updates all the dates an
times, and not just the one in that row.

What should I change??

Thanks in advance for helping me out
 
G

Guest

hi,
the now() function always displays now which is the system
clock. the now() function will change to the current time
as each refresh. useing now is good for assinging the
time stamp but if you wish it to remain that time always
then you will have to copy the formula and pasted it as
values. this changes the formula into hard data. you may
wish to write a macro to do this and assign it to the on
change event.
 
P

Plexx

"then you will have to copy the formula and pasted it as
values. this changes the formula into hard data. you may
wish to write a macro to do this and assign it to the on
change event. "
<--- seems like a complicated way to do this. I have never writte
macro's before. How do you do this? Can I make it so that it will star
automatically
 
D

David McRitchie

I've never worked with anything automatically pulling in data, but
see if this event macro will work.
http://www.mvps.org/dmcritchie/excel/event.htm#addtime
The instructions to install are at the top of the page, but it is simply:
Right click on the sheet tab, View code, ...
a bit simpler than installing normal macros into standard modules.

If you were to do this manually you would enter a constant by
Ctrl + ; (semicolon) the formula =NOW() will update everytime
your spreadsheet is recalculated.
 
Top