I keep getting a mismatch error in the following code but I don't understand why. Hoping someone can explain why. Thanks!!


Sub RoundVal()

Dim i As Long
Dim d As Double


For i = 2 To 9
Range("d" & i) = Application.WorksheetFunction.Round("a", i)
Next i


End Sub