Mikeymike_W
Board Regular
- Joined
- Feb 25, 2016
- Messages
- 171
Hi All,
Thanks in advance for any help you can provide.
I have a formula in VBA which rounds the values in a range to the nearest 0.5.
It works fine but it also sets all the cell values to zero if they are blank, does anyone know a way to get past this?
My code is:
For i = 5 To 20
Sheets(1).Cells(i, 7).Value = Application.MRound(Sheets(1).Cells(i, 7).Value, 0.25)
Next
I have this located in my active sheet under worksheet_change
Thanks again,
Mike
Thanks in advance for any help you can provide.
I have a formula in VBA which rounds the values in a range to the nearest 0.5.
It works fine but it also sets all the cell values to zero if they are blank, does anyone know a way to get past this?
My code is:
For i = 5 To 20
Sheets(1).Cells(i, 7).Value = Application.MRound(Sheets(1).Cells(i, 7).Value, 0.25)
Next
I have this located in my active sheet under worksheet_change
Thanks again,
Mike