+ Reply to Thread
Results 1 to 2 of 2

Time Question...is this possible?

  1. #1
    Registered User
    Join Date
    09-07-2005
    Posts
    2

    Time Question...is this possible?

    I am fairly new to excel but I have a general understanding of the software....I am use to using flash for certain things so I find myself wanting to use and "on click" type reference....Here is what I mean....I want a formula that tells cell B
    when Cell a has data entered, place the Static date into cell B....Now I understand I could use an if Statement to using "Today" as the true variable, problem is The "today" variable is not static, it is constantly updated....Is there a Static Time variable that will automatically pop in or is the only static time variable the control shift + :...any advice I can get will be appreciated...Thanks...

  2. #2
    Rowan
    Guest

    Re: Time Question...is this possible?

    You could use the VBA Date function with a sheet change event:

    For example if you wanted the date in column B every time data in column
    A was added (or changed) then:

    Private Sub Worksheet_Change(ByVal Target As Range)
    On Error GoTo ErrorHandler
    Application.EnableEvents = False
    If Target.Count = 1 And Target.Column = 1 Then
    Cells(Target.Row, 2).Value = Date
    End If
    ErrorHandler:
    Application.EnableEvents = True
    End Sub

    This is worksheet event code. Right click the sheet tab, select view
    code and paste the code in there.

    Hope this helps
    Rowan

    mileslit wrote:
    > I am fairly new to excel but I have a general understanding of the
    > software....I am use to using flash for certain things so I find myself
    > wanting to use and "on click" type reference....Here is what I mean....I
    > want a formula that tells cell B
    > when Cell a has data entered, place the Static date into cell B....Now
    > I understand I could use an if Statement to using "Today" as the true
    > variable, problem is The "today" variable is not static, it is
    > constantly updated....Is there a Static Time variable that will
    > automatically pop in or is the only static time variable the control
    > shift + :...any advice I can get will be appreciated...Thanks...
    >
    >


+ 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