+ Reply to Thread
Results 1 to 3 of 3

can excel automatically enter the date data in a cell was entered

  1. #1
    mg_sv_r
    Guest

    can excel automatically enter the date data in a cell was entered

    Can I get excel to enter the date in one cell that data was entered in
    another, without relying on the user to input this data?

    I have tried the TODAY() function but this changes the date each time te
    sheet is reloaded!

    Thanks in advance for any help.

    John

  2. #2
    Bernie Deitrick
    Guest

    Re: can excel automatically enter the date data in a cell was entered

    John,

    Copy the code below, right-click on the sheet tab, select "View Code", and paste the code into the
    window that appears.

    It will put the date in column B (in the same row) for any change in column A, if the change is done
    to a single cell and not to a group of cells.

    Obviously, the code can be modified to apply to any range of entered cells....

    HTH,
    Bernie
    MS Excel MVP

    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Cells.Count > 1 Then Exit Sub
    If Target.Column <> 1 Then Exit Sub
    Application.EnableEvents = False
    Target(1, 2).Value = Date
    Application.EnableEvents = True
    End Sub


    "mg_sv_r" <[email protected]> wrote in message
    news:[email protected]...
    > Can I get excel to enter the date in one cell that data was entered in
    > another, without relying on the user to input this data?
    >
    > I have tried the TODAY() function but this changes the date each time te
    > sheet is reloaded!
    >
    > Thanks in advance for any help.
    >
    > John




  3. #3
    mg_sv_r
    Guest

    Re: can excel automatically enter the date data in a cell was ente

    Thank you so much Bernie. Works great.

    "Bernie Deitrick" wrote:

    > John,
    >
    > Copy the code below, right-click on the sheet tab, select "View Code", and paste the code into the
    > window that appears.
    >
    > It will put the date in column B (in the same row) for any change in column A, if the change is done
    > to a single cell and not to a group of cells.
    >
    > Obviously, the code can be modified to apply to any range of entered cells....
    >
    > HTH,
    > Bernie
    > MS Excel MVP
    >
    > Private Sub Worksheet_Change(ByVal Target As Range)
    > If Target.Cells.Count > 1 Then Exit Sub
    > If Target.Column <> 1 Then Exit Sub
    > Application.EnableEvents = False
    > Target(1, 2).Value = Date
    > Application.EnableEvents = True
    > End Sub
    >
    >
    > "mg_sv_r" <[email protected]> wrote in message
    > news:[email protected]...
    > > Can I get excel to enter the date in one cell that data was entered in
    > > another, without relying on the user to input this data?
    > >
    > > I have tried the TODAY() function but this changes the date each time te
    > > sheet is reloaded!
    > >
    > > Thanks in advance for any help.
    > >
    > > John

    >
    >
    >


+ 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