Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
How to update cell on change
I have two columns: A and B. Column A is a text summary. Column B is a date
field. Each time I make any change to a cell in column A, I would like the corresponding cell in column B to update with today's date, thus showing when the most recent change was made. Any help would be appreciated. -- J.P. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
How to update cell on change
J.E. McGimpsey shows a way to put a time stamp on the same row when something
changes: http://www.mcgimpsey.com/excel/timestamp.html J.P. wrote: I have two columns: A and B. Column A is a text summary. Column B is a date field. Each time I make any change to a cell in column A, I would like the corresponding cell in column B to update with today's date, thus showing when the most recent change was made. Any help would be appreciated. -- J.P. -- Dave Peterson |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
How to update cell on change
J.P.
Private Sub Worksheet_Change(ByVal Target As Excel.Range) 'when entering data in a cell in Col A On Error GoTo enditall Application.EnableEvents = False If Target.Cells.Column = 1 Then n = Target.Row If Excel.Range("A" & n).Value < "" Then Excel.Range("B" & n).Value = Now End If End If enditall: Application.EnableEvents = True End Sub This is sheet event code. Right-click on the sheet tab and "View Code" Copy/paste the above into that module. Gord Dibben MS Excel MVP On Mon, 10 Jul 2006 11:49:01 -0700, J.P. wrote: I have two columns: A and B. Column A is a text summary. Column B is a date field. Each time I make any change to a cell in column A, I would like the corresponding cell in column B to update with today's date, thus showing when the most recent change was made. Any help would be appreciated. |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
How to update cell on change
Thanks Dave!
This was a very helpful link. I was able to update on change exactly as I wanted to with the macro provided. JP |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
How to update cell on change
Gord,
this also worked. The code is a little different from Dave's response, but the same outcome! Thanks for your help. JP -- J.P. "Gord Dibben" wrote: J.P. Private Sub Worksheet_Change(ByVal Target As Excel.Range) 'when entering data in a cell in Col A On Error GoTo enditall Application.EnableEvents = False If Target.Cells.Column = 1 Then n = Target.Row If Excel.Range("A" & n).Value < "" Then Excel.Range("B" & n).Value = Now End If End If enditall: Application.EnableEvents = True End Sub This is sheet event code. Right-click on the sheet tab and "View Code" Copy/paste the above into that module. Gord Dibben MS Excel MVP On Mon, 10 Jul 2006 11:49:01 -0700, J.P. wrote: I have two columns: A and B. Column A is a text summary. Column B is a date field. Each time I make any change to a cell in column A, I would like the corresponding cell in column B to update with today's date, thus showing when the most recent change was made. Any help would be appreciated. |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
How to update cell on change
Private Sub Worksheet_Change(ByVal Target As Range)
'Macro inserts date in Column B for change in Column A ActiveCell.Select If ActiveCell.Column = 1 Then 'Limits macro action to column A If Not Selection Is Nothing Then Application.Selection.Offset(0, 1).Value = Date End If Else End If End Sub Vaya con Dios, Chuck, CABGx3 "J.P." wrote in message ... I have two columns: A and B. Column A is a text summary. Column B is a date field. Each time I make any change to a cell in column A, I would like the corresponding cell in column B to update with today's date, thus showing when the most recent change was made. Any help would be appreciated. -- J.P. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help with this conditional IF statement | Excel Discussion (Misc queries) | |||
Adding a row to worksheet does not update cell references in another. | Excel Worksheet Functions | |||
Urgent date/scheduling calc needed | Excel Worksheet Functions | |||
change cell shading whenever contents different from previous cell | Excel Discussion (Misc queries) | |||
Copy cell format to cell on another worksht and update automatical | Excel Worksheet Functions |