+ Reply to Thread
Results 1 to 22 of 22

Record timestamp in one column automatically

  1. #1
    Registered User
    Join Date
    01-11-2009
    Location
    Woodland, CA
    MS-Off Ver
    Excel 2003
    Posts
    27

    Record timestamp in one column automatically

    I am creating a worksheet in excel 2003. Want to use this for attendance log.
    As we input numercial data in column B, we would like in column I to create a formula that automatically inputs the actual time that info was entered in column B. Appreciate any assistance.
    Thank you
    Last edited by gmaz2; 01-18-2009 at 02:35 AM.

  2. #2
    Registered User
    Join Date
    03-19-2007
    Posts
    29
    1] Set you column I's format as Custom: m/d/yyyy h:mm [E.g. Column I6]
    2] Type this in column I6

    =IF(A6>0,NOW(),"")

    That should do it. Have tried on my excel sheet and it works fine. ( if you just want the time set format as h:mm)

  3. #3
    Registered User
    Join Date
    12-15-2008
    Location
    Singapore
    Posts
    38
    The problem is when somebody enter something else in any cell, the time is going to change!

  4. #4
    Registered User
    Join Date
    12-15-2008
    Location
    Singapore
    Posts
    38
    The problem is when somebody enter something else in any cell, the time is going to change!

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531
    generally 2 options:

    1 - VBA
    2 - Iteration (circular references)

    The latter only really viable if you only want the time stamp to update once - ie the very first time you enter data into cell.

    See here for a thread on a similar theme - I provide instructions on both methods:

    http://www.excelforum.com/excel-gene...e-problem.html

  6. #6
    Registered User
    Join Date
    01-11-2009
    Location
    Woodland, CA
    MS-Off Ver
    Excel 2003
    Posts
    27
    Quote Originally Posted by gmaz2 View Post
    I am creating a worksheet in excel 2003. Want to use this for attendance log.
    As we input numercial data in column B, we would like in column I to create a formula that automatically inputs the actual time that info was entered in column B. Appreciate any assistance.
    Thank you
    I had tried the Now() IF option before I posted this request, and found that the timestamp updates by the minute, or second depending upon the formated cell h:mm or h:mm:ss etc. Once the numeric value in column b9 say is entered, in column I the time stamp entered should not change. I think this takes a Macro, or some code in VB. This is not in my expertise. Thank you very much for the suggestion though!! Still looking for ideas-

  7. #7
    Registered User
    Join Date
    01-11-2009
    Location
    Woodland, CA
    MS-Off Ver
    Excel 2003
    Posts
    27

    Over my Head

    Quote Originally Posted by DonkeyOte View Post
    generally 2 options:

    1 - VBA
    2 - Iteration (circular references)

    The latter only really viable if you only want the time stamp to update once - ie the very first time you enter data into cell.

    See here for a thread on a similar theme - I provide instructions on both methods:

    http://www.excelforum.com/excel-gene...e-problem.html
    Thank you for this insight, it is what I think I am looking for. My spread has headers rows 1->8. In Column B we input number data, a barcode stamp 1011 say, then in Column I, this is where we want the in time stamp to go, and not change in that column as new entries are inputted down the page. The in column K9, when the child is picked up we enter another barcode stamp, and then column M9, we want the pick up timestamp inserted in that field; with the same rule applied.

    If you help me with this, and provide a little more step by step, I should be able to get thru this-THANKS S-O-O-O MUCH

  8. #8
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531
    If using Iteration

    I9: =IF(AND(B9<>"",I9=0),NOW(),I9)
    M9: =IF(AND(K9<>"",M9=0),NOW(),M9)

    (be sure to turn Iteration on - set Max Iteration to 1)

    To reiterate - if at a later date you were to go back and adjust I9 again the time stamp in I9 would not update.

    VBA if feasible for you is the better approach IMO.

    Let us know.

  9. #9
    Registered User
    Join Date
    01-11-2009
    Location
    Woodland, CA
    MS-Off Ver
    Excel 2003
    Posts
    27

    Tried suggested resolution

    First of all--THANK YOU SO MUCH for your guidance-I tired the excel formula, =IF(AND(B9<>"",I9=0),NOW(),I9), found that when I copied the formula into the cell, the time stamp appeared, and no value was inputed in to the B9 column, and when I typed the value 1011 say, the time would not change as you stated in your example. I added to the formula string at that point
    =if(b9=0,"",to keep the formula hidden, which was successful. But at that point, no time data appeared in column I when I enter a numeric value in column B.

    I tried attaching my document to this email, but the server was down, I am not a VBA user, so I really don't have the expertise to work with this-
    Here is a sample of the fields. The example with 2150 then the time was a workaround attempt of mine, until the form can do what I was hoping for--that 9:50PM column will be deleted.
    BAR CODE NUMBER IN NAME TIME IN BAR CODE NUMBER OUT PARENT\GUARDIAN SIGNATURE TIME OUT
    SAMPLE FIELD
    1001 SMITH, MARY 2150 9:50 PM 1001 JOE SMITH 2050 8:50 PM
    1011 Austin, Alexa 10:21 AM 1011 10:22 AM


    Again thankyou for your help.
    Greg

  10. #10
    Registered User
    Join Date
    01-11-2009
    Location
    Woodland, CA
    MS-Off Ver
    Excel 2003
    Posts
    27

    attachment??

    Attached is the spread sheet for your reference. I hope it goes thru

    Thanks once again
    Last edited by gmaz2; 01-18-2009 at 11:31 PM.

  11. #11
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Maybe this event macro

    Right click sheet tab > view code > paste in the below.

    Please Login or Register  to view this content.
    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  12. #12
    Registered User
    Join Date
    01-11-2009
    Location
    Woodland, CA
    MS-Off Ver
    Excel 2003
    Posts
    27

    Oh so very close

    Now I need to ask one more thing, when a value is entered in column B, the timestamp is written in date and military time (hour, minutes, seconds) in column I, the code overwrites the formated cells in column I which is intended to be h:mm am/pm.
    Can you write to include the h:mm am/pm within the NOW statement in the code??
    Oh so very close
    Thanks
    Last edited by gmaz2; 01-17-2009 at 06:52 PM.

  13. #13
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Maybe

    Please Login or Register  to view this content.
    VBA Noob

  14. #14
    Registered User
    Join Date
    01-11-2009
    Location
    Woodland, CA
    MS-Off Ver
    Excel 2003
    Posts
    27

    Revised VBA

    It didn't seem to work, but I was fooling around with the original script, it continues to want to write the date and time in, it is converting it from military time to h:mm am/pm. Now need to ask if you can write the same formula, but apply it to Column j, to input the value and have time recorded in column L. This applies to students being checked out. The formula for Column B to I is their check in

    Thank you
    Last edited by gmaz2; 01-17-2009 at 07:48 PM.

  15. #15
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Maybe

    Please Login or Register  to view this content.
    Last edited by VBA Noob; 01-17-2009 at 08:10 PM.

  16. #16
    Registered User
    Join Date
    01-11-2009
    Location
    Woodland, CA
    MS-Off Ver
    Excel 2003
    Posts
    27

    Almost

    Your're awesome first of all--
    When you enter a numeric value in column B, the time is reported in column I as say 04:32pm, then you go to column J to input a numeric value, and current time stamp is entered in the same cell, it doesn't appear in column L

    Example:
    Column B Column I Column J Column L
    1011 04:12 PM 04:13 PM

  17. #17
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    I assume you would enter a number in Col K not J as that was a time cell.

    Change
    Please Login or Register  to view this content.
    to

    Please Login or Register  to view this content.
    Where Case 10 is Column J and the 3 is the offset to Col M

    VBA Noob

  18. #18
    Registered User
    Join Date
    01-11-2009
    Location
    Woodland, CA
    MS-Off Ver
    Excel 2003
    Posts
    27

    Mission Accomplished!!

    Thank you very much-everything works great.

  19. #19
    Registered User
    Join Date
    01-19-2009
    Location
    Pakistan
    MS-Off Ver
    Excel 2003
    Posts
    8
    i want to enter data in A and time of the data entry in B please help me i have used
    now() with iteration 1 but doest work

  20. #20
    Registered User
    Join Date
    01-11-2009
    Location
    Woodland, CA
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: Record timestamp in one column automatically

    Quote Originally Posted by VBA Noob View Post
    Maybe

    Please Login or Register  to view this content.
    I just had an opportunity to run this script in action-found one small problem-entered data in column b, time stamp appeared as planned in column i. Then entered data in column j, time stamp entered in column L, as scripted. I wonder, is it possible when data is entered in column b9 (which the first data row/field) the cursor drops down to b10, which it now does, BUT when data is entered into column j9, that the cursor tabs to column k10, and still enters time stamp in column L10 as scripted above??

  21. #21
    Registered User
    Join Date
    01-11-2009
    Location
    Woodland, CA
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: Record timestamp in one column automatically

    Quote Originally Posted by VBA Noob View Post
    I assume you would enter a number in Col K not J as that was a time cell.

    Change
    Please Login or Register  to view this content.
    to

    Please Login or Register  to view this content.
    Where Case 10 is Column J and the 3 is the offset to Col M

    VBA Noob
    I just had an opportunity to run this script in action-found one small problem-entered data in column b, time stamp appeared as planned in column i. Then entered data in column j, time stamp entered in column L, as scripted. I wonder, is it possible when data is entered in column b9 (which the first data row/field) the cursor drops down to b10, which it now does, BUT when data is entered into column j9, that the cursor tabs to column k10, and still enters time stamp in column L10 as scripted above??

  22. #22
    Registered User
    Join Date
    01-11-2009
    Location
    Woodland, CA
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: Record timestamp in one column automatically

    VBA NOOB

    Back on Jan 11, you helped me with a script that inputted a time stamp in a given location.
    Well I got a change to test this spread sheet, using the script, and run into an issue.
    Found one small problem-entered data in column b, time stamp appeared as planned in column i. Then entered data in column j, time stamp entered in column L, as scripted. I wonder, is it possible when data is entered in column b9 (which the first data row/field) the cursor drops down to b10, which it now does, BUT when data is entered into column j9, that the cursor tabs to column k9, and still enters time stamp in column L9 as scripted above??
    What I discovered is that when data was entered in J9, we had to click on K9, so we could enter a signature using EPAD software.

    Appreciate it if you could revisit my thread.

    Thank you very much
    gmaz2

+ 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