+ Reply to Thread
Results 1 to 4 of 4

Show date cell modified

  1. #1
    manxman
    Guest

    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. #2
    Gord Dibben
    Guest

    Re: 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 <[email protected]>
    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. #3
    Gord Dibben
    Guest

    Re: 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 <[email protected]>
    >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. #4
    manxman
    Guest

    RE: 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1