Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to customize Excel such that when a user changes any column in a
particular row, a date column in that row will be updated to the current date-time. Do I need a macro to do that? I have a software background, but not in macros. Can someone jot for me please some code that would do that? Thanks!! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can use the Change Event
See Chip Pearson's page on Events Private Sub Worksheet_Change(ByVal Target As Range) If Target.Row = 3 And Target.Rows.Count = 1 Then Application.EnableEvents = False Cells(3, "F").Value = Now() Application.EnableEvents = True End If End Sub Right click on the sheet tab and select view code. Put in code similar to the above. -- Regards, Tom Ogilvy "Jack Gur" <Jack wrote in message ... I want to customize Excel such that when a user changes any column in a particular row, a date column in that row will be updated to the current date-time. Do I need a macro to do that? I have a software background, but not in macros. Can someone jot for me please some code that would do that? Thanks!! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
To update date for several rows use the following script
Private Sub Worksheet_Change(ByVal Target As Range) Dim R As Variant For Each R In Target.Rows Application.EnableEvents = False Cells(R.Row, "F").Value = Now() Application.EnableEvents = True Next End Sub "Tom Ogilvy" wrote: You can use the Change Event See Chip Pearson's page on Events Private Sub Worksheet_Change(ByVal Target As Range) If Target.Row = 3 And Target.Rows.Count = 1 Then Application.EnableEvents = False Cells(3, "F").Value = Now() Application.EnableEvents = True End If End Sub Right click on the sheet tab and select view code. Put in code similar to the above. -- Regards, Tom Ogilvy "Jack Gur" <Jack wrote in message ... I want to customize Excel such that when a user changes any column in a particular row, a date column in that row will be updated to the current date-time. Do I need a macro to do that? I have a software background, but not in macros. Can someone jot for me please some code that would do that? Thanks!! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
conditional formatting for cell date to equal today's date | Excel Worksheet Functions | |||
Excel 2003 make 1 date cell automatically change another date cell | Excel Worksheet Functions | |||
date in Cell to change colors if the date is beyond today's date | Excel Discussion (Misc queries) | |||
Automatically update a cell with a date based on anther cells date | Excel Discussion (Misc queries) | |||
How to update a cell if a specific date is included in a date rang | Setting up and Configuration of Excel |