• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA direction [SOLVED]

blcexcel

Member
I have a macro for a template. In the final step I need it to do an if statement and then do one of either two actions. The macro should stop after whichever direction it goes. Will the two different actions need to be subroutines? If so how do I switch to them from an if statement? I'm having trouble finding an example on the Internet. Thanks in advance!
 
Here's an example

[pre]
Code:
Sub MyTest()
If Range("A1") = "Luke" Then
'I do something here
Else
'I do something different here
End If
End Sub
[/pre]
 
Perhaps I was trying to make this more difficult than it needs to be. I will have to do some testing after a meeting.
 
Yes I was trying to make this much more difficult than needed. The simple If Then works fine. Thanks Luke M!
 
Back
Top