Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
macro to copy and paste into another workbook | Excel Discussion (Misc queries) | |||
Copy & Paste macro | Excel Worksheet Functions | |||
Macro help - copy a cell down | Excel Discussion (Misc queries) | |||
Copy Paste macro | Excel Discussion (Misc queries) | |||
Can't Copy and Paste between Excel 2003 Workbooks | Excel Discussion (Misc queries) |