Share via

Payroll spreadsheet question

Anonymous
2024-07-03T11:46:16+00:00

Working on a payroll spreadsheet....I have a cell that, dependant on the previous cell, displays only the first 8 hours worked. Maximum of 8. If a person works 13 hours in a day, this cell will display a maximum of 8. But can also display a lower amount if necessary. I believe MAX and MIN may come into play here. I may also be formatting my cells wrong. Thanks!

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

riny 20,870 Reputation points Volunteer Moderator
2024-07-08T08:31:06+00:00

In that context, the 8 is interpreted as 8 days. Thus, 16 hours and 30 minutes is less then 8 days.

To make it work, use =MIN( 8/24, H7 )

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

5 additional answers

Sort by: Most helpful
  1. Anonymous
    2024-07-08T08:45:27+00:00

    Hello, Robert SimsPI

    Try putting quotation marks around 8.

    For example:

    I7=MIN(H7;"8:00")

    Best wishes,

    Lucia Wu - MSFT | Microsoft Community Support Specialist

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2024-07-08T07:50:31+00:00

    Hello!

    I'm sorry I haven't responded...been out on vacation.

    I tried your recommendation of using the =MIN(8,referenced cell). Here is my result:

    I'm not getting the desired result of a MAXIMUM of 8 Hours. Could it be with the formatting of H7 or I7? I have them both set to Custom [H]:mm.

    I appreciate your assistance!

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2024-07-08T06:18:06+00:00

    Hello, Robert SimsPI

    I haven't received the message from you yet. If there is anything more that I can do for you or if anything is unclear, please do not hesitate to let me know.  

    Best wishes,

    Lucia Wu - MSFT | Microsoft Community Support Specialist

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2024-07-04T10:47:25+00:00

    Hello, Robert SimsPI

    Welcome to Microsoft Community.  

    I realize that you want to display the first 8 hours a person worked in a cell based on the previous cell. No matter what the previous cell shows in terms of hours worked, this cell will display a maximum of 8 hours. If less than 8 hours, it will display the actual value.

    For example, if a person works 13 hours, the cell is 8.

    If a person works 6 hours, the cell is 6.

    Please feel free to correct me if my understanding is wrong.

    You are right, it is available to use the MIN formula.

    =MIN(8; reference to the previous cell)

    For example, if the previous cell is A1, you can enter the following formula in B1:

    =MIN(8;A1)

    I hope my reply helps you. Please let me know whether the result fit your expectation. I'm looking forward to your reply.   

    Best wishes,

    Lucia Wu - MSFT | Microsoft Community Support Specialist

    Was this answer helpful?

    0 comments No comments