#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 98
Default Date Update

I have a spreadsheet in which I type information after contacting a client.
Next to this cell I put the date that I contacted that client. I often have
to contact the same client and overtype the information that was previously
in that cell. Is there a way to automatically update the date after I
overtype their information so that it shows when I last contacted that client?

Any help would be appreciated.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 36
Default Date Update

"Nigel" wrote in message
...
I have a spreadsheet in which I type information after contacting a client.
Next to this cell I put the date that I contacted that client. I often
have
to contact the same client and overtype the information that was
previously
in that cell. Is there a way to automatically update the date after I
overtype their information so that it shows when I last contacted that
client?


You could do this with some VBA code -- specifically an "event procedure".

Rightclick the sheet tab and select "View Code" from the pop-up menu to
access the VBA module for the sheet. Then paste this into the module:

Private Sub Worksheet_Change(ByVal Target As Range)
If Selection.Cells.Count < 1 Then Exit Sub
If Target.Column = 1 Then
Target.Offset(0, 1) = Date
End If
End Sub

It assumes that the "info column" is A (Target.Column = 1) and the date
column is B (Target.Offset(0, 1), i.e. one to the right), so change those to
suit if necessary.

Alternatively, you could just use the kb shrtcut for insert current date
(CTRL+;).


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 98
Default Date Update

Thanks Andy, will give it a go!

"Andy Brown" wrote:

"Nigel" wrote in message
...
I have a spreadsheet in which I type information after contacting a client.
Next to this cell I put the date that I contacted that client. I often
have
to contact the same client and overtype the information that was
previously
in that cell. Is there a way to automatically update the date after I
overtype their information so that it shows when I last contacted that
client?


You could do this with some VBA code -- specifically an "event procedure".

Rightclick the sheet tab and select "View Code" from the pop-up menu to
access the VBA module for the sheet. Then paste this into the module:

Private Sub Worksheet_Change(ByVal Target As Range)
If Selection.Cells.Count < 1 Then Exit Sub
If Target.Column = 1 Then
Target.Offset(0, 1) = Date
End If
End Sub

It assumes that the "info column" is A (Target.Column = 1) and the date
column is B (Target.Offset(0, 1), i.e. one to the right), so change those to
suit if necessary.

Alternatively, you could just use the kb shrtcut for insert current date
(CTRL+;).



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 98
Default Date Update

Worked a treat, thanks!

"Andy Brown" wrote:

"Nigel" wrote in message
...
I have a spreadsheet in which I type information after contacting a client.
Next to this cell I put the date that I contacted that client. I often
have
to contact the same client and overtype the information that was
previously
in that cell. Is there a way to automatically update the date after I
overtype their information so that it shows when I last contacted that
client?


You could do this with some VBA code -- specifically an "event procedure".

Rightclick the sheet tab and select "View Code" from the pop-up menu to
access the VBA module for the sheet. Then paste this into the module:

Private Sub Worksheet_Change(ByVal Target As Range)
If Selection.Cells.Count < 1 Then Exit Sub
If Target.Column = 1 Then
Target.Offset(0, 1) = Date
End If
End Sub

It assumes that the "info column" is A (Target.Column = 1) and the date
column is B (Target.Offset(0, 1), i.e. one to the right), so change those to
suit if necessary.

Alternatively, you could just use the kb shrtcut for insert current date
(CTRL+;).



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,646
Default Date Update

You can do that with this Change event sub?

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 Then 'column of your client data, "A" in this
example
Cells(Target.Row, Target.Column + 1).Value = Date 'same row, next
column
End If
End Sub

Regards,
Stefi


€žNigel€ť ezt Ă*rta:

I have a spreadsheet in which I type information after contacting a client.
Next to this cell I put the date that I contacted that client. I often have
to contact the same client and overtype the information that was previously
in that cell. Is there a way to automatically update the date after I
overtype their information so that it shows when I last contacted that client?

Any help would be appreciated.

Thanks



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 do I create a schedule from a list of dates ? Gavin Morris Charts and Charting in Excel 2 October 28th 10 04:08 PM
Date to update after 7 days Please Steved Excel Worksheet Functions 4 February 14th 06 12:57 AM
Need to Improve Code Copying/Pasting Between Workbooks David Excel Discussion (Misc queries) 1 January 6th 06 03:56 AM
NETWORKDAYS - Multiple Date Selection Annabelle Excel Discussion (Misc queries) 3 October 4th 05 07:04 PM
Automatic Date Update khaji00 Excel Discussion (Misc queries) 2 June 22nd 05 11:48 PM


All times are GMT +1. The time now is 06:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"