+ Reply to Thread
Results 1 to 4 of 4

Lock Cell based on Condition and Repeat till Last Row

  1. #1
    Registered User
    Join Date
    06-26-2009
    Location
    South Africa
    MS-Off Ver
    Excel 2003
    Posts
    74

    Lock Cell based on Condition and Repeat till Last Row

    Hey Guys

    I'm trying to get this code to run :

    HTML Code: 
    Basically, it needs to detect whether a value in Col E is "YES/NO" if it is "NO" or blank, then the corresponding cell in Col H needs to "0" and Locked, so the only way a user can enter a value is if the cell in Col E is switched to "YES" again

    This should be repeated for as many rows as there are from H17 downwards
    If H17 downards happens to be blank, then the macro should exit ie do nothing

    I've been running into continous loop problems and have not yet been able to solve it

    Any ideas here?
    Attached Files Attached Files

  2. #2
    Forum Contributor wamp's Avatar
    Join Date
    11-10-2008
    Location
    Norway
    MS-Off Ver
    97, 2000 & 2003 (diff. workstations)
    Posts
    184

    Re: Lock Cell based on Condition and Repeat till Last Row

    I think it would be easier to accomplish this in a worksheet-change event

    like this for example.
    Please Login or Register  to view this content.
    Last edited by wamp; 05-21-2010 at 05:51 AM. Reason: added code
    _______________________________________________
    Remember:

    Read the rules!

    Use code tags! Place [CODE] before the first line of code and [/CODE] after the last line of code.

    Mark your post [SOLVED] if it has been answered satisfactorily.
    To do this, click EDIT in your original post, click GO ADVANCED and set the PREFIX. It helps everybody!

    If you are approve (or disapprove) of any members response to your problem, please click the star icon underneath their post and comment. It matters.

  3. #3
    Registered User
    Join Date
    06-26-2009
    Location
    South Africa
    MS-Off Ver
    Excel 2003
    Posts
    74

    Re: Lock Cell based on Condition and Repeat till Last Row

    Thanks - that does help.

    It's not quite where I want it, but perhaps I can edit it a little to get the outcome I'm looking for

  4. #4
    Registered User
    Join Date
    06-26-2009
    Location
    South Africa
    MS-Off Ver
    Excel 2003
    Posts
    74

    Re: Lock Cell based on Condition and Repeat till Last Row

    Thanks - that does help.

    It's not quite where I want it, but perhaps I can edit it a little to get the outcome I'm looking for

+ 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