#1   Report Post  
Chris
 
Posts: n/a
Default Updated Field...

If I have some text information in a cell and when that text changes, I want
to a date to get updated to today's date, how would I do that?

Example:
A1 contains text that reads "123456890TEST"
A2 is formatted as a date and if I changed the text above to "XYZ" A2 would
change to 10.24.05

Think of it like tracking in a way... If something changes in Cell1, update
Cell2 with today's date...
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default Updated Field...

Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "A1:A100"

On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
With Target
.Offset(0, 1).Value = Format(Date, "dd mmm yyyy")
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Chris" wrote in message
...
If I have some text information in a cell and when that text changes, I

want
to a date to get updated to today's date, how would I do that?

Example:
A1 contains text that reads "123456890TEST"
A2 is formatted as a date and if I changed the text above to "XYZ" A2

would
change to 10.24.05

Think of it like tracking in a way... If something changes in Cell1,

update
Cell2 with today's date...



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
How can I show all field data in a pivot table, instead of blank Alastair Scott Excel Discussion (Misc queries) 3 August 17th 05 07:08 PM
Pivot Table Comment Field robertjtucker Excel Discussion (Misc queries) 6 August 1st 05 03:39 PM
Stop text from stringing into next field when empty NothingButRomance Excel Worksheet Functions 7 May 17th 05 02:22 AM
Stop text from stringing into next field when empty NothingButRomance Excel Worksheet Functions 2 May 15th 05 05:32 PM
Problems with Pivot Table Field Sorting in Excel 2002 Phoenix71555 Excel Discussion (Misc queries) 1 February 27th 05 11:25 PM


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

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"