Okay, if you want to specify the range in the code (rather than working on a selection), then change that to:
Sub foo()
Dim c As Range
On Error Resume Next
For Each c In Range("B7:I40")
c.Value = Round(c.Value, 2)
Next c
End Sub
Be aware that as written, this will always run on the active sheet. You may want to qualify the range with a worksheet reference - so that would look like:
Sub foo()
Dim c As Range
On Error Resume Next
For Each c In Worksheets("Sheet1").Range("B7:I40")
c.Value = Round(c.Value, 2)
Next c
End Sub
Bookmarks