Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
How do I get the macro to end itself once all the data has been taken
elsewhere? If IsEmpty("Q2") Then Exit Sub? Else 'do nothing - it's still got data I want it to continue the macro End If? 'here there is an error message of "End If without Block If" |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
How about trying:
If Range("Q2").value = "" then Exit Sub -- Kevin Backmann "Rokuro kubi" wrote: How do I get the macro to end itself once all the data has been taken elsewhere? If IsEmpty("Q2") Then Exit Sub? Else 'do nothing - it's still got data I want it to continue the macro End If? 'here there is an error message of "End If without Block If" |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Sub Macro1()
If IsEmpty(Range("Q2").Value) Then Exit Sub End If End Sub -- Gary''s Student "Rokuro kubi" wrote: How do I get the macro to end itself once all the data has been taken elsewhere? If IsEmpty("Q2") Then Exit Sub? Else 'do nothing - it's still got data I want it to continue the macro End If? 'here there is an error message of "End If without Block If" |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Great, cheers guys.
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Compiling macro based on cell values | Excel Discussion (Misc queries) | |||
Conditional Format as a MACRO | Excel Worksheet Functions | |||
checking that cells have a value before the workbook will close | Excel Worksheet Functions | |||
macro help | Excel Discussion (Misc queries) | |||
blank cell turns to 0 | New Users to Excel |