Inserting Date
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

Thread: Inserting Date

  1. #1
    New Member
    Join Date
    Mar 2002
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    This has to be so simple, my brain has farted, and I cant think...

    I am setting up a spreadsheet, so that when I insert data in cell A* that the date is automatically inserted in cell B*

    Ive used the =NOW() it works sort of.

    BUT!

    EG. if I enter data in cell A33 the date and time set in ALL earlier cells is changed to current time and date..

    Thanks for ya time too.

  2. #2
    Board Regular
    Join Date
    Feb 2002
    Location
    Georgia USA
    Posts
    569
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    This will put the date and time in column B when you enter something in column A, take out time & " " & if you don't want the time. Hope this helps
    Private Sub Worksheet_Change(ByVal Target As Excel.Range)
    If Target.Count > 1 Then Exit Sub
    Select Case Target.Column
    Case 1
    Cells(Target.Row, 2) = Time & " " & Date
    End Select
    End Sub

  3. #3
    New Member
    Join Date
    Mar 2002
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Sorry to sound stoopid, but this formula, where do I enter that?

    If I type it into a cell, it comes up as text.

    Is it something special?

    Im using Office 97.

    Thanks as well for ya help.


    [ This Message was edited by: virtual-bird on 2002-03-05 17:00 ]

  4. #4
    New Member
    Join Date
    Mar 2002
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    OK.
    I got that working in Visual Basic.
    Works a treat!!!

    Now, if I clear the data in Cell A, the date stays in Cell B.

    How do I clear this one.

    Again Extreme thanks for the help.

    [ This Message was edited by: virtual-bird on 2002-03-05 17:26 ]

  5. #5
    Guest

    Default

      
    select column B when you select your data in A and delete them at the same time, because this is in VBA it will put the date back in when you enter your data in A again

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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

 

 
DMCA.com