View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gary L Brown
 
Posts: n/a
Default inserting a conditional "go to" command on a excel "if" function

From the Visual Basic Editor put something like the following code.
Obviously, change what the condition is that you are looking for from
'Range("C10").Value = 10' to your particular condition and change the name of
the macro from 'MyMacro' to your macro's name.


'/=========================================/
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("C10").Value = 10 Then
MyMacro
End If
End Sub
'/=========================================/


HTH,
--
Gary Brown

If this post was helpful, please click the ''Yes'' button next to ''Was this
Post Helpfull to you?''.


"velasques" wrote:

How do I do if, in a macro, if I want to write a condition that sends the
command pront to a specific routine, if a particular condition is verified?