+ Reply to Thread
Results 1 to 7 of 7

Lock cells based on a date

  1. #1
    Registered User
    Join Date
    04-11-2018
    Location
    Australia
    MS-Off Ver
    2016
    Posts
    22

    Lock cells based on a date

    Hi guys,
    Thanks heaps for helping me with the part 1 of my problem.
    Part 2 of my problem:

    I want to lock down the sheet allowing only few cells unlocked for data entry and unlock certain cells based on a date so no one can edit the data in that cell before or after that date.

    123.jpg

    1. First 5 columns and last 2 columns should be always unlocked giving the ability to change data any time
    2. YES/NO drop down before Follow up after 48 hours should be unlocked only of that date is today (eg: H2 = Today()). Same for Reminder call YES/NO (Eg K2=Today())

    I found the below VBA script but it unlocks the entire ROX if the conditions are met.

    Please Login or Register  to view this content.

    Is there any way to do this without a VBA script because I want to host this file in Office 365 and 365 don’t support VBA ?

    Much appreciate your help.
    Last edited by antonywijesinghe; 04-12-2018 at 11:26 PM.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,164

    Re: Lock cells based on a date

    Hi Anthony,

    I don't think VBA will work on your Excel Online. Read about it at:

    https://technet.microsoft.com/en-us/...or=-2147217396
    Look for the section of VBA and Macro Scripting.

    https://support.office.com/en-us/art...a-4f0fb5014343
    Last edited by MarvinP; 04-12-2018 at 11:02 PM.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    04-11-2018
    Location
    Australia
    MS-Off Ver
    2016
    Posts
    22

    Re: Lock cells based on a date

    I saw this while a when searching for a solution for a different problem. That’s why I am looking for a way to do what I want without VBA ��

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2403 Win 11 Home 64 Bit
    Posts
    23,811

    Re: Lock cells based on a date

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Click on Edit to open your thread, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  5. #5
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,164

    Re: Lock cells based on a date

    You can do it manually..

    Look at the first link above for "Protection". It says:
    When you share an Excel file with other users, you can protect a worksheet to help prevent it from being changed, and you can choose the actions that you allow the users of your worksheet to perform.

  6. #6
    Registered User
    Join Date
    04-11-2018
    Location
    Australia
    MS-Off Ver
    2016
    Posts
    22

    Re: Lock cells based on a date

    Hi Marvin,

    That will protect the entire sheet and unlock the entire sheet when password is entered. I want only specific cells to be protected/unprotected based on a date

  7. #7
    Registered User
    Join Date
    04-11-2018
    Location
    Australia
    MS-Off Ver
    2016
    Posts
    22

    Re: Lock cells based on a date

    OK !! I did something like this using conditional formatting
    Capture2.JPG

    format the cell (G3) BLACk if cell H3<>Today()

    but the problem is it will format every cell in that column if the cell is not = Today(). I want to leave the above cells as it is (user cant change) with YES/NO.

+ 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. Replies: 16
    Last Post: 05-06-2020, 06:12 PM
  2. Lock Cells after Date has Expired
    By pd1386 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-29-2015, 11:01 AM
  3. [SOLVED] How lock rows and protect cells based on date in first column
    By udaybrown7 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-27-2014, 05:47 PM
  4. Lock Cells after Specified Date
    By EMcK in forum Excel General
    Replies: 1
    Last Post: 08-27-2014, 03:20 AM
  5. How to lock worksheet based on the current date
    By Dan Vollmer in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-20-2012, 09:35 PM
  6. Lock cells after a certain time/date?
    By nettorrep22 in forum Excel General
    Replies: 0
    Last Post: 07-14-2010, 11:23 AM
  7. Lock cells based on value of other cells - code simplification query
    By glenin in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-07-2009, 03:11 AM

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