run macro only if condition is met
Sub Macro1()
If Cells(1, 1) = 1 Then
Exit Sub
Else
MsgBox ("HI")
End If
End Sub
--
Gary's Student
"Nikonov" wrote:
I need to run a macro (copy one cell into another) only if a certain
condition is met. For example, if x=a, then run this macro. If not, do
something else.
|