+ Reply to Thread
Results 1 to 5 of 5

Lock value in cells on/after a date in another cell

  1. #1
    Registered User
    Join Date
    01-16-2014
    Location
    Derby, England
    MS-Off Ver
    365
    Posts
    60

    Lock value in cells on/after a date in another cell

    Hello all!

    Not sure if this is even possible!

    I have a tracker for orders that gets updated daily with the number of orders requested and orders delivered/fulfilled. On a second tab which is linked by a =sheetnameCell formula, is where I want to stop the data changing after a certain date so I can see at what percentage was achieved 12 weeks before the orders were due to be 100% complete.
    In the attached example, the Tracker Tab is the one I want to be able to enter data in daily, the second tab SLA is the one where I need data in columns F, G and H to lock on (and after) the date in column E (just the row). As of today (20/10) the data in yellow should not change even if the data in the tracker tab changes but the orange should change. Then on the 22/10 row 21 should then lock. I hope that make sense!
    I don't mind if the SLA tab has to be changed/revamped etc!

    Many thanks in advance,
    Attached Files Attached Files

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,868

    Re: Lock value in cells on/after a date in another cell

    code to be inserted in Thisworkbook module

    Please Login or Register  to view this content.
    open the attachment but not allow macros - you will see the unchanged sheet.
    close, open again allowing macros - the formulas will be replaced with current values for dates in column D earlier than 12 weeks from today. Such check and possible changing into values will be conducted every time the file is open, so when you open it in a week next row will become blocked. By the way, I think that 2023 Jan 13 shall be blocked tomorrow.

    You can also add such code before End Sub to make sure last changes are immediately saved:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Best Regards,

    Kaper

  3. #3
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: Lock value in cells on/after a date in another cell


    Hi Kaper !

    As the code is located within the ThisWorkbook class module so you can remove ThisWorkbook. before Save statement …

  4. #4
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,868

    Re: Lock value in cells on/after a date in another cell

    Indeed
    But on the other hand, it makes no harm, and if for some reason the code is copied to other (standard) module will also work.

  5. #5
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: Lock value in cells on/after a date in another cell


    Yes no harm and yes again obviously in case of a copy to another module type ...

+ 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. Lock cells based on a date
    By antonywijesinghe in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-13-2018, 03:05 AM
  2. Macro to date stamp cell below when text entered then password lock both cells
    By JohnDoh in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-03-2015, 10:20 AM
  3. How to lock cells after a date has passed
    By QuintonMcCloud in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-17-2015, 03:40 AM
  4. [SOLVED] Lock a range of cells base on current date relative to cell reference
    By egchristensen in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-13-2015, 05:11 PM
  5. Lock Cells after Specified Date
    By EMcK in forum Excel General
    Replies: 1
    Last Post: 08-27-2014, 03:20 AM
  6. Replies: 4
    Last Post: 05-01-2013, 07:38 PM
  7. Lock cells after a certain time/date?
    By nettorrep22 in forum Excel General
    Replies: 0
    Last Post: 07-14-2010, 11:23 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