#VALUE

South

New Member
Joined
Aug 26, 2024
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Good morning,
Can anyone help please. I have the following formula =H19-G19-IF((H19-G19)*60*24>=(10*60),(1/24),IF((H19-G19)*60*24>=(5*60),(0.5/24),0)) in a cell to calculate how many hours worked between start and finish time minus 30 minutes for each 5 hours worked. I have two issues

1. While the start and finish times are blank I get #VALUE but once I input times its ok. How can I make it show 0 instead of #VALUE
2. When I input times that go from one evening to the morning I get ####### (a negative number) how can I correct this?

Any help truly appreciated
 

Attachments

  • 1st.png
    1st.png
    5.8 KB · Views: 4

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Try this formula:
Excel Formula:
=LET(tc,IF(H19<G19,TODAY()+1+H19-G19,H19-G19),
tc-INT(tc/(5/24))*0.5/24)
 
Upvote 0
Thanks for your reply the formula has worked and fixed the negative number issue.

Is there a way of hiding the #VALUE! when start and finish time are blank?
 

Attachments

  • 2nd.PNG
    2nd.PNG
    7.1 KB · Views: 1
Upvote 0
Weirdly it doesn’t give me an error - perhaps your 'blanks' aren’t really blank but rather contain spaces or something?
Anyway, you can wrap the whole thing in an IFERROR function.
Excel Formula:
=IFERROR(LET(tc,IF(H19<G19,TODAY()+1+H19-G19,H19-G19),
tc-INT(tc+H20/(5/24))*0.5/24),0)
 
Upvote 0
Solution
I have resolved the #VALUE! by ADDING IF ERROR

=IFERROR(LET(tc,IF(H9<G9,TODAY()+1+H9-G9,H9-G9),tc-INT(tc/(5/24))*0.5/24),"")

Thanks again myall_blues for your help with the formula.
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,173
Members
451,543
Latest member
cesymcox

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