+ Reply to Thread
Results 1 to 4 of 4

Need macro which locks cells (C57:C61) based on data validation selection (C1)

  1. #1
    Registered User
    Join Date
    08-06-2012
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Need macro which locks cells (C57:C61) based on data validation selection (C1)

    Greetings,

    This is my first post. Happy to be here.

    The data validation selection for which I need the cells to lock are: "Pre-Hire Re-Hire C to I Conversion" AND "Pre-Hire - C to I Conversion".

    In addition, if a notification could also pop-up which reads "No Referrals for C to I conversions."

    Please let me know if I need to provide you any further detail.

    Best,
    mopetten

  2. #2
    Valued Forum Contributor tlafferty's Avatar
    Join Date
    04-08-2011
    Location
    United States, Tacoma, WA
    MS-Off Ver
    Excel 2010, Excel 2013 Customer Preview
    Posts
    1,112

    Re: Need macro which locks cells (C57:C61) based on data validation selection (C1)

    Welcome to the forum! Do you want the cells to lock instantly once the selction is made, or do you want the user to make the selction, then click a button to apply the change? It would also be helpful if you'd consider posting a sample workbook.
    Last edited by tlafferty; 08-06-2012 at 03:58 PM. Reason: request for sample workbook.
    If your question has been satisfactorily addressed, please consider marking it solved. Click the Thread Tools dropdown and select Mark thread as solved.
    Also, you might want to add to the user's reputation by clicking the star icon in the lower left corner of the post with the answer- it's why we do what we do...

    Thomas Lafferty
    Analyst/Programmer

  3. #3
    Registered User
    Join Date
    08-06-2012
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Need macro which locks cells (C57:C61) based on data validation selection (C1)

    Hi Tlafferty,

    Thanks for replying. I'd like to to be instant once the selection is made.

    mopetten

  4. #4
    Valued Forum Contributor tlafferty's Avatar
    Join Date
    04-08-2011
    Location
    United States, Tacoma, WA
    MS-Off Ver
    Excel 2010, Excel 2013 Customer Preview
    Posts
    1,112

    Re: Need macro which locks cells (C57:C61) based on data validation selection (C1)

    On your keyboard, press Alt + F11 to open the code window.
    Double click ThisWorkbook, and paste in this code:
    Please Login or Register  to view this content.
    Note that you need to name your data validation drop down HireType for this code to work.
    Last edited by tlafferty; 08-06-2012 at 04:18 PM. Reason: Further explanation

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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