Skip to content

Instantly share code, notes, and snippets.

@harsha547
Created June 7, 2017 13:51
Show Gist options
  • Save harsha547/f0cf73261dc26d92b20974d153d969e3 to your computer and use it in GitHub Desktop.
Save harsha547/f0cf73261dc26d92b20974d153d969e3 to your computer and use it in GitHub Desktop.
Sub First_Method()
For i = 1 To 7
On Error GoTo Tab1:
Range("B" & i).Value = Range("A" & i).Value + i
NextCol:
Next i
Tab1:
Resume NextCol
End Sub
Sub Second_Method()
For i = 1 To 7
On Error GoTo Tab1:
Range("B" & i).Value = Range("A" & i).Value + i
Next i
Tab1:
Resume Next
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment