+ Reply to Thread
Results 1 to 2 of 2

Inserting a date when cell is changed

  1. #1
    Registered User
    Join Date
    01-04-2006
    Posts
    70

    Inserting a date when cell is changed

    Hi.

    I need Excel to insert a date in a certain cell (F26) when another cell is altered (C7). The trouble is that the date entered in F26 mustn't change, it must always read as the date when C7 was altered.


    I can't seem to make it work without the date constantly changing to the new day's date.

    Gavin

  2. #2
    Jim Thomlinson
    Guest

    RE: Inserting a date when cell is changed

    Here is some code for you to try. It only works if C7 is a constant and not a
    formula. Right click the sheet tab and select view code and then paste this...

    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Address = "$C$7" Then Range("F26").Value = Date
    End Sub
    --
    HTH...

    Jim Thomlinson


    "Gavin Ling" wrote:

    >
    > Hi.
    >
    > I need Excel to insert a date in a certain cell (F26) when another cell
    > is altered (C7). The trouble is that the date entered in F26 mustn't
    > change, it must always read as the date when C7 was altered.
    >
    >
    > I can't seem to make it work without the date constantly changing to
    > the new day's date.
    >
    > Gavin
    >
    >
    > --
    > Gavin Ling
    > ------------------------------------------------------------------------
    > Gavin Ling's Profile: http://www.excelforum.com/member.php...o&userid=30110
    > View this thread: http://www.excelforum.com/showthread...hreadid=512015
    >
    >


+ 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