+ Reply to Thread
Results 1 to 5 of 5

Locking certain cells on a particular date and time.

  1. #1
    Registered User
    Join Date
    12-02-2011
    Location
    Edinburgh
    MS-Off Ver
    MS Office 365 (Word, Excel, Powerpoint, Publisher)
    Posts
    23

    Locking certain cells on a particular date and time.

    Hi

    I'm not sure if this should be in here, or formulas and functions, but I have a spreadsheet where colleagues can enter their forecasted figures for the following week but I want to lock these cells at 4pm on the Friday. There is a cell which has the W/E date in it so is there a way that I can have cells D3:D100 lock at 4pm on Friday before the W/E date (UK format dd/mm/yyyy) stated in cell K1? Thanks Excel Lock Cells.png

  2. #2
    Registered User
    Join Date
    02-22-2013
    Location
    India
    MS-Off Ver
    2010
    Posts
    87

    Re: Locking certain cells on a particular date and time.

    Yes, it's possible and this can be achieved by a piece of VBA code. If you are familiar with VBA then I can provide you solution.

  3. #3
    Registered User
    Join Date
    12-02-2011
    Location
    Edinburgh
    MS-Off Ver
    MS Office 365 (Word, Excel, Powerpoint, Publisher)
    Posts
    23

    Re: Locking certain cells on a particular date and time.

    Hi Amarjeet. I have a basic understanding of VBA and would be happy to try and implement your code. The sheet is also password protected so I'll also need some code to unlock the sheet whilst the cells are being locked and then reinstate the sheet protection if that's possible. Thank you.

  4. #4
    Valued Forum Contributor
    Join Date
    12-01-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2016
    Posts
    949

    Re: Locking certain cells on a particular date and time.

    try,
    this will check every hour

    put the 2 sub inside a module

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    inside the workbook open
    Please Login or Register  to view this content.
    Last edited by k1dr0ck; 02-07-2023 at 07:58 AM.

  5. #5
    Valued Forum Contributor
    Join Date
    12-01-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2016
    Posts
    949

    Re: Locking certain cells on a particular date and time.

    my mistake
    Friday would be a 6 so
    Please Login or Register  to view this content.
    also fixed the no end with statement see post #4 again
    Last edited by k1dr0ck; 02-07-2023 at 07:59 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. VBA for locking cells if not todays date
    By Abukhadeejah in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-21-2015, 03:49 AM
  2. Date locking cells
    By Robbiew76 in forum Excel General
    Replies: 1
    Last Post: 12-18-2013, 03:25 AM
  3. Locking certain cells after a set time.
    By strikerman9 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-08-2013, 08:19 AM
  4. Locking certain cells after a set time.
    By strikerman9 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-07-2013, 08:37 PM
  5. Locking cells with date
    By ranghad in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-16-2013, 09:24 PM
  6. Locking a Date/Time Format
    By thedryden in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-09-2006, 12:33 PM
  7. Replies: 2
    Last Post: 09-10-2005, 01:05 PM

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