+ Reply to Thread
Results 1 to 4 of 4

Need Help With Locking Formula in Protected Sheet

  1. #1
    Registered User
    Join Date
    02-10-2016
    Location
    Blaine, mn
    MS-Off Ver
    2007
    Posts
    79

    Need Help With Locking Formula in Protected Sheet

    Hello!
    I have a timesheet that I have created in Excel. I have this set up so that all the employee has to do is fill in the Start and Stop time for each job. Then the sheet auto calculates the Total Day Hours, and Regular Hours. Then if the employee has any vacation, sick , OT or DT they enter that amount where applicable and it will adjust the Regular Hours.

    We've been using this timesheet for years, and the only problem we have had is that occassionally an employee will erase the formula in a cell and then before you know it, the sheet doesn't work anymore. So I decided to use the Locked Cells and Protect the worksheet.

    I like how it works, but I have one small issue.

    Although we require everyone to take a lunch, there are instances in which they will not. As you will see in my example, this employee was at job1 from 7-12, then went to job2 12-1300, and went to the dr from 1300-1630. This employee did not take a 30min lunch break so that they don't have to take as much of their vacation time.

    The problem is, I have the Regular Hours row locked. So they can't adjust this. This employee is supposed to work 9 hour days, so the Regular and Vacation should equal 9. Any suggestions? My only thought is to add another row saying Adjusted hours and leave it unlocked, but I think this will just add to confuse the employees.

    Thank you!
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,455

    Re: Need Help With Locking Formula in Protected Sheet

    I can't see where in the sheet there would be a problem if the employee did not fill in their lunch break times - could you explain a bit more?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    02-10-2016
    Location
    Blaine, mn
    MS-Off Ver
    2007
    Posts
    79

    Re: Need Help With Locking Formula in Protected Sheet

    The total day hours are 9.5 if they don't put say 12:00-12:30 in the Lunch row. If they do, they total day hours are 9 -this is working just fine.

    The Regular hours without the lunch calculates to 8 hours. Which is correct. Then the employee types in the number 1 in the Vacation Row, and the Regulars adjust to 7. That is only 8 and not what they should be paid for. They are to have 9 hours in their day. The dr. appt was 2 hours long but they didn't take a lunch. Therefore the Regular Hours should be 8. I can't figure a way to do this without unprotecting that cell so they can change it manually, and I don't want to do that because they will delete the formula that is there and save and the next time if they had a regular 9 hour day, it would auto calculate for them.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,455

    Re: Need Help With Locking Formula in Protected Sheet

    You could add an IF clause to the formula to allow for a 'missing' lunch break.

+ 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. Locking a cell based on drop down menu selection (Protected Worksheet)
    By DRogersICF in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-30-2014, 03:52 PM
  2. Locking only one page field (report filters) of a pivot table in a protected sheet???
    By kzahariev in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-12-2013, 08:48 AM
  3. Pasting outside data into unlocked cell of protected sheet without the cell locking
    By DarthMinogue in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-15-2011, 09:12 PM
  4. Locking/Unlocking Cells in Protected Worksheets
    By dteresinski in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-16-2010, 08:26 AM
  5. Only allow locking of cells in a protected sheet
    By zarniuup in forum Excel General
    Replies: 2
    Last Post: 08-30-2010, 02:53 PM
  6. [SOLVED] Macro for locking cells after worksheet is protected
    By Hugo in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-17-2006, 04:05 PM
  7. [SOLVED] locking formula in cells in without locking whole sheet
    By SuziQ in forum Excel General
    Replies: 1
    Last Post: 07-21-2006, 11:05 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