Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 104
Default How to set current day when a cell in a colum change

I wold like some help on the below matter:

ID Status ChangeDate Resp.
---------------------------------------------
1 Closed 2006-06-01 XXXX
2 New 2006-06-20 YYYY
3 Working 2006-07-01 XXXX

Every time Status is change I would like to have ChangeDate to be updated
current date and Resp. with the Name/initials of the person editing the Excel
Sheet - any suggestions?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 210
Default How to set current day when a cell in a colum change

Steen,

The following code should put you in the right direction. It has to be
placed in the sheet object.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 2 Then
If Target.Offset(0, -1) = "" Then
Target.Offset(0, -1) = Target.Offset(-1, -1) + 1
End If
Target.Offset(0, 1) = Now
Target.Offset(0, 2) = Environ("username")
End If
End Sub
--
http://HelpExcel.com

516-984-0252


"Steen" wrote:

I wold like some help on the below matter:

ID Status ChangeDate Resp.
---------------------------------------------
1 Closed 2006-06-01 XXXX
2 New 2006-06-20 YYYY
3 Working 2006-07-01 XXXX

Every time Status is change I would like to have ChangeDate to be updated
current date and Resp. with the Name/initials of the person editing the Excel
Sheet - any suggestions?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 104
Default How to set current day when a cell in a colum change

Hi galimi

Nice - it work quite fine.

I have a quistion - what does this line take care of:
If Target.Offset(0, -1) = "" Then
Target.Offset(0, -1) = Target.Offset(-1, -1) + 1

/Stony

"galimi" wrote:

Steen,

The following code should put you in the right direction. It has to be
placed in the sheet object.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 2 Then
If Target.Offset(0, -1) = "" Then
Target.Offset(0, -1) = Target.Offset(-1, -1) + 1
End If
Target.Offset(0, 1) = Now
Target.Offset(0, 2) = Environ("username")
End If
End Sub
--
http://HelpExcel.com

516-984-0252


"Steen" wrote:

I wold like some help on the below matter:

ID Status ChangeDate Resp.
---------------------------------------------
1 Closed 2006-06-01 XXXX
2 New 2006-06-20 YYYY
3 Working 2006-07-01 XXXX

Every time Status is change I would like to have ChangeDate to be updated
current date and Resp. with the Name/initials of the person editing the Excel
Sheet - any suggestions?

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 assign cell A1 to show the current cursor cell in Excel? OB Excel Discussion (Misc queries) 2 October 11th 06 04:02 PM
insert date Larry Excel Worksheet Functions 28 July 15th 06 02:41 AM
Ms Excel, Copying Cell to current sheet using 'Right Click' SacSuggests Excel Discussion (Misc queries) 0 June 21st 06 08:26 AM
I Need a formula to evaluate a cell with + or - values Bob in Oklahoma Excel Worksheet Functions 6 October 31st 05 02:41 PM
Cell Change Color - Need Help alani New Users to Excel 3 June 29th 05 03:50 PM


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