Column showing negative or hours. Not zero.

glenzos

New Member
Joined
Sep 1, 2024
Messages
1
Office Version
  1. 365
Platform
  1. Windows
I total hours in Excel. 9am-5:30pm, half hour lunch, 8 hour day. I want the next column to show total hours, the next column, straight time (8 hours). But if I go under 8 hours, let's say 7 hours. It will read either -1, or 23. Depending on what I type. I want it to show it over 8 hours, and 0 when it's under. Can someone help me
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
If I'm reading it correctly then maybe (column C formatted as hh:mm, column D formatted as General)....

Book1
ABCD
29:00 AM5:30 PM8:308
39:00 AM4:30 PM7:300
49:00 AM6:30 PM9:309
59:00 AM7:00 PM10:009.5
Sheet5
Cell Formulas
RangeFormula
C2:C5C2=B2-A2
D2:D5D2=IF(C2-TIMEVALUE("00:30:00")<TIMEVALUE("08:00:00"),0,(C2-TIMEVALUE("00:30:00"))*24)


Or (columns C and D formatted as General)

Book1
ABCD
1
29:00 AM5:30 PM8.58
39:00 AM4:30 PM7.50
49:00 AM6:30 PM9.59
59:00 AM7:00 PM109.5
Sheet5
Cell Formulas
RangeFormula
C2:C5C2=(B2-A2)*24
D2:D5D2=IF((B2-A2)*24<8.5,0,(B2-A2)*24-0.5)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,150
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top