+ Reply to Thread
Results 1 to 2 of 2

Assistance Needed: Locking a Range based on a Cell Value

  1. #1
    Registered User
    Join Date
    09-30-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    6

    Assistance Needed: Locking a Range based on a Cell Value

    Hi Everyone,

    Hope you're having a great day.

    I'm a bit out of my depth with a tool I'm creating for work, a simplified version of which I have attached for reference.

    Requirement 1: If the current month (B4) exceeds any month in the range G6:AP6, the cells in that month's field (i.e. G9:G18 for month 'Nov-13' as determined by G6) should become locked and uneditable. This workbook will ultimately be protected with a password so I only need this to work as described above when the Workbook is locked. Ultimately, I will need to apply this macro to all the months in cells G6:AP6 so that any time B4 > the month in G6:AP6, that month's range is uneditable.

    As you can see, I've used conditional formatting to colour the cells based on a similar formula in which the cells are coloured red if B4>G6 (or H6, etc.).

    Requirement 2: If the month in the range G6:AP6 matches the current month (B4), the sum of cells G9:G17 (for month in G6) must equal the value in G7 (business days). If the month in the range G6:AP6 comes after the current month (B4), then the sum of the range G9:G18 (for month G6- note, I've deliberately left G18 out of the calculation when B4 = G6) can equal any value.

    I've edited this sheet to include only 1 employee but the actual workbook I'm using will have up to 50 employees included in the rows below the first one.

    Any assistance is much appreciated!

    Regards,
    Naas
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    09-30-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Assistance Needed: Locking a Range based on a Cell Value

    Hmm... have I not received a response because this is too easy for the experts on this forum or because it's too hard?

    Any help is appreciated!

+ 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. Macro Needed to delete range of cells based on null values in another cell
    By jeffmarsiglio in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-13-2013, 08:22 AM
  2. [SOLVED] Desperate Help needed with Locking out a range of cells based on selection from 1 cell
    By Vcummi in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-31-2012, 04:12 PM
  3. Locking a Range of Cells Based on Other Cell Values
    By _Ryan_ in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-02-2010, 06:59 PM
  4. Replies: 12
    Last Post: 05-14-2010, 10:25 AM
  5. Assistance needed with case statement changing cell and font colors
    By drewship in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-25-2009, 10:50 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