GoTo - tasmia9/VBA GitHub Wiki

Sub Simple()

If VBA.IsError(Range("B3").Value) Then GoTo LeaveRN

Range("C3").Value = Range("B3").Value Exit Sub LeaveRN:

Range("C3").Value = " There was an error found so you get no value"

End Sub

// We put in the exit Sub just before LeaveRn because otherwise it would print an error even when no errors were detected