+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    01-26-2010
    Location
    Vancouver, WA,US
    MS-Off Ver
    Excel 2007
    Posts
    2

    Talking keeping up to date

    I am trying to document in an excel what days I do a certain thing. So I want to have the date and time inserted in a cell lets say A2 when I type in lets say B2 And I want that to continue down the column on both a and b. So the date is inserted when corresponding cell has characters in it. Any ideas? for a macro or VBA code?

    thanks guys.

  2. #2
    Forum Moderator Richard Buttrey's Avatar
    Join Date
    02-15-2008
    Location
    Grappenhall, UK
    MS-Off Ver
    Excel for Windows & Mac - all versions.
    Posts
    5,826

    Re: keeping up to date

    Hi and welcome to the forum.

    Put the following in the Worksheet Change event (F11 to the Visual Basic Environment, double click the sheet in question, from the left hand drop down select 'Worksheet' and in the right hand drop down select 'Change'

    Code:
    Private Sub Worksheet_Change(ByVal Target As Range)
        If Not Intersect(Target, Range("B:B")) Is Nothing Then
            Range("A" & Target.Row) = Format(Date, "mm/dd/yy") & "_" & Format(Time, "h:m:s")
        End If
    End Sub
    HTH
    Richard Buttrey

    If this was useful then please rate it appropriately.

    Click the small star icon at the bottom left of my post.

  3. #3
    Registered User
    Join Date
    01-26-2010
    Location
    Vancouver, WA,US
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: keeping up to date

    thanks alot man. that worked flawlessly. thanks soooo very much.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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.2.0