MROUND giving a #NUM! error as result is a minus number

Allen_Mead

New Member
Joined
May 31, 2019
Messages
34
Office Version
  1. 365
Platform
  1. Windows
So, am working out spare capacity of staff to the nearest half day and am using the following formula:

Excel Formula:
=MROUND(IFERROR((H8-SUM(H10))/8,""), 0.5)

where;
H8 = 40 (number of contract hours per week)
H10 = XX (number of hours booking per week)

the 8 in the formula above equates to the number of hours per day.

So, in the instance I am getting the error, H10 - 42 hours, 2 hours over the contracted hours per week. I'd like to be able to show this as a negative figure and not an error. If I change the formula to 'ROUND' and the number of places to '1' there's no error but then I get for example 4.3 days.

Many thanks
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Using Mroud your calculation will have to pos , pos or neg neg can't have a pos , neg so you need to work in a solution if value <0 e.g.
=MROUND(A1,IF(A1>0,0.05,-0.05))
 
Upvote 0
How about
Excel Formula:
=LET(hr,(H8-H10)/8,MROUND(hr, 0.5*SIGN(hr)))
 
Upvote 1
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,304
Members
452,633
Latest member
DougMo

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