Sub STEP15() Dim r As Long Dim m As Long Dim wb1 As Workbook Set wb1 = Workbooks.Open("C:UsersWolfieeeStyleDesktopHotStocks1.xls") Set ws1 = wb1.Worksheets.Item(1) Application.ScreenUpdating = False With ws1 m = .Range("A" & .Rows.Count).End(xlUp).Row For r = 2 To m If .Range("H" & r).Value < .Range("D" & r).Value Then .Range("K" & r).Value = Application.Ceiling(.Range("K" & r).Value, 0.05) .Range("K" & r).NumberFormat = "0.00" Else .Range("K" & r).Value = Application.Floor(.Range("K" & r).Value, 0.05) .Range("K" & r).NumberFormat = "0.00" End If Next r End With Application.ScreenUpdating = True wb1.Save wb1.Close End Sub
Hi Sholtan,
As I've asked you on other posts, please supply the workbook(s). Impossible to do anything without the data this code operates with.
Please define faster.
How slow is this code?
How fast do you expect it to be?
Phil