PC Review


Reply
Thread Tools Rate Thread

Cell update formula

 
 
=?Utf-8?B?Q0REQUggTkhT?=
Guest
Posts: n/a
 
      13th Oct 2006
Hi

Does anyone know of a formula for Excel 2003 that will stamp the date & time
in a particular cell if anything in that row has changed?

Many thanks

Neil
 
Reply With Quote
 
 
 
 
John
Guest
Posts: n/a
 
      13th Oct 2006
Hi there,

If you want to do this for a single sheet, add the following to the specific
Sheet object (ie not a separate module):

Private Sub Worksheet_Change(ByVal Target As Range)
Dim iRow As Integer
iRow = Target.Row
Cells(iRow, 1).Value = Now()
End Sub


....or, if you want it to effect the whole workbook then add this to the
Workbook object:

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Dim iRow As Integer
iRow = Target.Row
Cells(iRow, 1).Value = Now()
End Sub


Basically, when the change event fires 'Target' becomes a range from which
you can check the row number. You then use that in the cell address (Row x,
Column 1) to place the date and time.

Hope that helps.

Best regards

John

"CDDAH NHS" <(E-Mail Removed)> wrote in message
news:53ED7BAD-6F14-4FF9-B38B-(E-Mail Removed)...
> Hi
>
> Does anyone know of a formula for Excel 2003 that will stamp the date &
> time
> in a particular cell if anything in that row has changed?
>
> Many thanks
>
> Neil



 
Reply With Quote
 
=?Utf-8?B?Q0REQUggTkhT?=
Guest
Posts: n/a
 
      13th Oct 2006
Excellent, thanks John!
 
Reply With Quote
 
=?Utf-8?B?SkxHV2hpeg==?=
Guest
Posts: n/a
 
      13th Oct 2006
Be aware that the Now() will recalculate each time you open the file whether
there is a change or not.

"CDDAH NHS" wrote:

> Excellent, thanks John!

 
Reply With Quote
 
John
Guest
Posts: n/a
 
      13th Oct 2006
Good point.

You might want to change that to:

Cells(iRow, 1).Value = CStr(Now())

Best regards

John


"JLGWhiz" <(E-Mail Removed)> wrote in message
news:898A1A04-999B-4B63-95C6-(E-Mail Removed)...
> Be aware that the Now() will recalculate each time you open the file
> whether
> there is a change or not.
>
> "CDDAH NHS" wrote:
>
>> Excellent, thanks John!



 
Reply With Quote
 
Paul B
Guest
Posts: n/a
 
      14th Oct 2006
=NOW() will recalculate, but what john is doing dose not put in a formula
it puts in the date and time so it will not recalculate
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"JLGWhiz" <(E-Mail Removed)> wrote in message
news:898A1A04-999B-4B63-95C6-(E-Mail Removed)...
> Be aware that the Now() will recalculate each time you open the file

whether
> there is a change or not.
>
> "CDDAH NHS" wrote:
>
> > Excellent, thanks John!



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
update formula in column when another cell formula is changed Susanelm Microsoft Excel Worksheet Functions 1 9th Jun 2008 05:06 PM
Update Excel cell in formula not refreshing answer cell =?Utf-8?B?Sm9obm55?= Microsoft Excel Misc 2 21st Jun 2007 05:49 AM
update formula cell =?Utf-8?B?Q2Fycmd1eQ==?= Microsoft Excel Programming 1 3rd Aug 2006 10:52 PM
Update cell reference within a formula Jean Microsoft Excel Misc 1 4th Feb 2006 11:57 PM
Formula to update cell w/ActiveCell.Value? Ed Microsoft Excel Discussion 3 12th May 2004 02:14 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:58 AM.