+ Reply to Thread
Results 1 to 10 of 10

How to lock cells based on conditions?

  1. #1
    Forum Contributor
    Join Date
    01-01-2022
    Location
    India
    MS-Off Ver
    Home 2021
    Posts
    777

    How to lock cells based on conditions?

    Hi,

    Hope all are doing well.

    In attached file, the entire sheet is locked except columns C,D,E,F,G,H,I and M starting from row 4.

    My requirement: Once column I shows as Conveyed, data modification should be disabled.

    i.e.

    When a value is selected in a particular row under Column H, i want the columns from B to H to be locked only for that particular row.

    Ex. When cell H4 is selected from dropdown, cells B4, C4, D4, E4, G4, H4 should get locked. (A, I and J are already locked so they should remain locked while Column K is unlocked and should remain unlocked). Modification shuld only be possible by unprotecting the worksheet.


    Note: Only the columns for that particular row should be locked and not others so that data can be entered in other rows.


    Pass: Abc@123


    Just out of curiosity, i tried applying all borders to column K but no border is being applied at right side. Any idea what's the reason behind this


    Can someone please help with the above requests
    Attached Files Attached Files
    Last edited by rizwanulhasan; 04-11-2023 at 08:42 AM. Reason: 1 requirement solved. Other pending.

  2. #2
    Forum Contributor
    Join Date
    01-01-2022
    Location
    India
    MS-Off Ver
    Home 2021
    Posts
    777

    Re: How to lock cells based on conditions?

    Hi,

    Can anyone help please

  3. #3
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    1,980

    Re: How to lock cells based on conditions?

    Does this work for you?

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    01-01-2022
    Location
    India
    MS-Off Ver
    Home 2021
    Posts
    777

    Re: How to lock cells based on conditions?

    @ByteMarks

    Absolute perfection. Thanks a lot.

    Just 1 issue.

    When i make a new entry in a new row, after entering data in column B, C,D, E etc , when i double click on any cell such as E5, F5, the data becomes invisible/deletes

    Can you please check once
    Attached Files Attached Files
    Last edited by rizwanulhasan; 04-11-2023 at 12:38 PM.

  5. #5
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    1,980

    Re: How to lock cells based on conditions?

    I think it's a consequence of having the Hidden property ticked under Format Cells/Protection.

  6. #6
    Forum Contributor
    Join Date
    01-01-2022
    Location
    India
    MS-Off Ver
    Home 2021
    Posts
    777

    Re: How to lock cells based on conditions?

    Indeed.

    Thanks once again

  7. #7
    Forum Contributor
    Join Date
    01-01-2022
    Location
    India
    MS-Off Ver
    Home 2021
    Posts
    777

    Re: How to lock cells based on conditions?

    Hi,

    Hope all are doing well.

    Can i have help once more please?

    Sheet 2023 in the attached file locks automatically using below VBA.


    Please Login or Register  to view this content.

    However, i want the below filter options to be included in VBA (while its locking the sheet) so that i can use options in "Filter" sheet.

    An someone modify VBA please?

    Both sheets will be protected along with VBA.

    Pass: Abc@123
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by rizwanulhasan; 04-26-2023 at 02:11 PM.

  8. #8
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    1,980

    Re: How to lock cells based on conditions?

    Try using

    Please Login or Register  to view this content.
    This will allow existing filters pivot tables to be used.

  9. #9
    Forum Contributor
    Join Date
    01-01-2022
    Location
    India
    MS-Off Ver
    Home 2021
    Posts
    777

    Re: How to lock cells based on conditions?

    Perfect.

    Thanks again ByteMarks

  10. #10
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    1,980

    Re: How to lock cells based on conditions?

    Happy to help.

+ 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/Unlock cells based on multiple other cells
    By DRS95 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 02-23-2022, 06:14 AM
  2. Lock row based on one cells value
    By richie.oliva in forum Excel General
    Replies: 6
    Last Post: 10-03-2020, 05:15 PM
  3. lock cells based on colourindex
    By ngan202 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-27-2017, 01:04 PM
  4. Lock Cells based on criteria
    By amandeep08 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-09-2016, 11:58 AM
  5. [SOLVED] VBA lock cells based on their content
    By Sinon05 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-30-2015, 10:29 AM
  6. [SOLVED] Macro to lock rows based on two conditions
    By fpt264 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-31-2014, 10:34 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

Tags for this Thread

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