+ Reply to Thread
Results 1 to 10 of 10

How to lock the NOW function?

  1. #1
    Registered User
    Join Date
    05-07-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    9

    Question How to lock the NOW function?

    Hi,

    I'm a newbie here and I'm working on our Attendance Sheet for our team. Is it possible to lock the =NOW() function? beacause i want to use it as Time-in indicator. Once I open the file it will automatically sets the Time-in using the NOW function but the only problem is I don't know how to lock it so that no one can change the time-in column once they open the file. Can someone help me? Coz everytime I save it then close it the moment I open the file to check the time changes. Please please help!!!

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: How to lock the NOW function?

    You need time stamp for this.

    http://www.mcgimpsey.com/excel/timestamp.html
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: How to lock the NOW function?

    No you can't lock the function because it's volatile by nature... I'm not sure that Time stamping is even possible by functions alone (but I'm sure someone will prove me wrong)
    A VBA method
    1. The Now() function resides in a single (hidden) cell somewhere ... A1 for this example
    2. The column for Time stamping (In) is C
    3. Put this code in the worksheet module

    Please Login or Register  to view this content.
    Now to Time stamp a cell in column C you just double click on it.
    Elegant Simplicity............. Not Always

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: How to lock the NOW function?

    Quote Originally Posted by AndyLitch View Post
    No you can't lock the function because it's volatile by nature... I'm not sure that Time stamping is even possible by functions alone (but I'm sure someone will prove me wrong)

    .
    I have use this way, more than 100 times...and more than 10 examples in this forum.

  5. #5
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: How to lock the NOW function?

    if you're going to use code it's easier to use
    Please Login or Register  to view this content.
    rather than put a NOW() formula in a cell ;-)
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  6. #6
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: How to lock the NOW function?

    I knew there would be an answer and i know it's a very common question.... I've not searched for old answers to this because I have my own solution which works very well and I just shared it with MHace ... Does that offend you Fotis?

  7. #7
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: How to lock the NOW function?

    I use the worksheet now because it automatically operates in the local date/time format.... I've had issues passing dates between VBA and the worksheet in the past because VBA is locked to the American standard... This may have changed but I don't know so i offer up the simplest solutions where possible

  8. #8
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: How to lock the NOW function?

    Quote Originally Posted by AndyLitch View Post
    I knew there would be an answer and i know it's a very common question.... I've not searched for old answers to this because I have my own solution which works very well and I just shared it with MHace ... Does that offend you Fotis?
    If you knew, why did you asked?-Just i ask. i don't need an answer.

    Well done!!

    Should i ???. Unfortunnately no. I just don't care.

  9. #9
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: How to lock the NOW function?

    there are only regional issues when passing date/time strings to a sheet-date data types remain the same. date() and now() are both locale aware anyway :-)

  10. #10
    Registered User
    Join Date
    05-07-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: How to lock the NOW function?

    Thanks for quick reponse I will revert as soon as possible after trying your suggestions.

+ 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