Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.misc
CLR CLR is offline
external usenet poster
 
Posts: 594
Default 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
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
Help with this conditional IF statement C-Dawg Excel Discussion (Misc queries) 3 May 15th 06 06:01 PM
Adding a row to worksheet does not update cell references in another. blausen Excel Worksheet Functions 5 February 25th 06 09:14 PM
Urgent date/scheduling calc needed jct Excel Worksheet Functions 3 February 24th 06 01:36 AM
change cell shading whenever contents different from previous cell zooeyhallne Excel Discussion (Misc queries) 3 June 6th 05 09:59 PM
Copy cell format to cell on another worksht and update automatical kevinm Excel Worksheet Functions 21 May 19th 05 11:07 AM


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