+ Reply to Thread
Results 1 to 6 of 6

Help With Formula To Lock Or Unlock Cells Base On Their COntent

  1. #1
    Registered User
    Join Date
    05-15-2011
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2007, Excel MAC 2008
    Posts
    64

    Help With Formula To Lock Or Unlock Cells Base On Their COntent

    Hi guys looking for a bit of help on a method to lock a cells base on another cells contents

    Example

    If A1 = YES then user cannot enter data into B1
    If A1 = any other content a user can etner data into it




    do you know if there is a formula method of this?

    Help appreciated

    Barbara

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Help With Formula To Lock Or Unlock Cells Base On Their COntent

    What if A1 is left blank?
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    05-15-2011
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2007, Excel MAC 2008
    Posts
    64

    Re: Help With Formula To Lock Or Unlock Cells Base On Their COntent

    If A1 = blank then user can also enter data in to B1

    thank you

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Help With Formula To Lock Or Unlock Cells Base On Their COntent

    Try this...

    Select cell B1
    Goto the Data tab>Data Validation
    Allow: Custom
    Formula: =A1<>"Yes"

    You can include custom input/error alert messages if desired.

    Note however, the user can still copy/paste or drag-n-drop into cell B1. The only way to prevent those operations is to use a VBA event macro.

  5. #5
    Registered User
    Join Date
    05-15-2011
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2007, Excel MAC 2008
    Posts
    64

    Re: Help With Formula To Lock Or Unlock Cells Base On Their COntent

    Great Tony Thanks For The Help!

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Help With Formula To Lock Or Unlock Cells Base On Their COntent

    You're welcome!

+ 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 specific cells in a row based on another cell content of the same row
    By st_rod000 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-10-2014, 02:58 AM
  2. Lock and Unlock Cells with VBA
    By gelinasc in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-26-2012, 09:40 PM
  3. Lock/Unlock some cells in a row
    By processchip in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-16-2011, 01:05 PM
  4. Lock cells so content or formula can't be changed
    By Rayan83 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-14-2008, 09:01 AM
  5. lock/unlock cells
    By john tempest in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-16-2006, 03:55 PM
  6. Lock and Unlock Cells
    By Peter in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-29-2005, 01:06 PM
  7. [SOLVED] Lock and Unlock cells using VBA
    By Peter in forum Excel General
    Replies: 1
    Last Post: 01-29-2005, 10:06 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