Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
manxman
 
Posts: n/a
Default Show date cell modified

We have a table with material prices, and would like to see at a glance, in
the next cell, when a price was last modified.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gord Dibben
 
Posts: n/a
Default Show date cell modified

manx

Right-click on the sheet tab and "View Code".

Copy/paste the following event code to that module.

As you enter/edit prices in column A, the data/time will be stamped in column B.


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


Gord Dibben MS Excel MVP

On Fri, 17 Mar 2006 15:57:12 -0800, manxman
wrote:

We have a table with material prices, and would like to see at a glance, in
the next cell, when a price was last modified.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gord Dibben
 
Posts: n/a
Default Show date cell modified

Typo.......should be date/time will be stamped


Gord

On Sat, 18 Mar 2006 15:43:57 -0800, Gord Dibben <gorddibbATshawDOTca wrote:

manx

Right-click on the sheet tab and "View Code".

Copy/paste the following event code to that module.

As you enter/edit prices in column A, the data/time will be stamped in column B.


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


Gord Dibben MS Excel MVP

On Fri, 17 Mar 2006 15:57:12 -0800, manxman
wrote:

We have a table with material prices, and would like to see at a glance, in
the next cell, when a price was last modified.


Gord Dibben MS Excel MVP
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
manxman
 
Posts: n/a
Default Show date cell modified

Thank you Gord, it works great.

"manxman" wrote:

We have a table with material prices, and would like to see at a glance, in
the next cell, when a price was last modified.

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
if data in one cell, then date in adjacent cell Jane Excel Worksheet Functions 8 December 22nd 07 03:34 AM
How do I get a cell to show the day of the week when date entered Captain Excel Discussion (Misc queries) 9 December 27th 05 06:45 AM
How do I show file creation date in a cell in Excel? Eddie Armstrong Excel Worksheet Functions 7 December 14th 05 09:21 PM
Date Range within one cell Cachod1 New Users to Excel 5 October 18th 05 03:30 AM
enter a time into a cell, have the cell show two times the entry johnp Excel Worksheet Functions 3 May 2nd 05 12:08 AM


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