VBA Syntax problem

  • Thread starter Thread starter JP
  • Start date Start date
J

JP

I am trying to set up a macro which would only run if there is a value in
any of the three cells to the left of active cell. The following does not
seem to work and would appreciate any help in correcting this:

If ActiveCell.FormulaR1C1 = "(SUM(RC[-3]:RC[-1])<>0" Then
run macro code
End If

JP
 
Try

If Application.Counta(Activecell.Offset(0, -3).Resize(, 3)) > 0 Then

run macro code
End If
 
Back
Top