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

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

Ace71425

Board Regular
Joined
Apr 20, 2015
Messages
130
No where would I insert that? and that wouldnt round down .75 value also would it?
 
Learn Excel from Bill Jelen

Understanding data is crucial, and the easiest place to start is with Microsoft Excel.

Forum statistics

Threads
1,151,573
Messages
5,765,181
Members
425,266
Latest member
CPAgirl

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
Top