Help on if function

  • Thread starter Thread starter DeViL_LaW
  • Start date Start date
D

DeViL_LaW

can any1 tell me the formula to run a macro from an if statement?
eg =if(a1>a2,macro...,macro...)
 
try
right click on the sheet tab>view code>insert this>SAVE

Private Sub Worksheet_Calculate()
If Range("a1") > Range("a2") Then
Macro1
Else
Macro2
End If
End Sub
 
Back
Top