Round down .5 in VBA Math.Round function

Ace71425

Board Regular
Joined
Apr 20, 2015
Messages
130
This code below looks at field c2 in hours worksheet and writes the text "hours" x amount of times based on the value in that field to the work worksheet. It works great BUT I need it to round DOWN any .5 value instead of rounding up. Is that possible? Can I put like an IF statement that specifies what to do if the value is x.5?

Code:
Sub Test()
    Application.ScreenUpdating = False
    Dim bottomD As Long
    bottomD = Sheets("Work").Range("D" & Rows.Count).End(xlUp).Row
    Sheets("Work").Range("D" & bottomD + 1 & ":D" & bottomD + Math.Round(Sheets("Hours").Range("C2"), 0)) = "HOURS"
    Application.ScreenUpdating = True
End Sub
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

Forum statistics

Threads
1,214,920
Messages
6,122,267
Members
449,075
Latest member
staticfluids

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