Conditional Copy Paste Macro
This is an example that only looks at one cell:
Sub Macro1()
Call Macro10
Call Macro11
End Sub
Sub Macro11()
MsgBox ("IN 11")
End Sub
Sub Macro10()
Dim r1, r2 As Range
Set r1 = Worksheets("Sheet1").Range("A1")
Set r2 = Worksheets("Sheet2").Range("A1")
If r1.Value = "" Then
Else
r1.Copy r2
End If
End Sub
Macro10 is the conditional one. If A1 in sheet1 is empty, Macro 10 just
exits. Otherwise it does the copy before exiting
--
Gary's Student
"WH" wrote:
I want to creat a conditional macro that if say Sheet1 has data copy the data
to Sheet2, but if Sheet1 is blank do nothing and go on to the next macro.
Can anyone help. Thank you in advance.
Bill
|