Spartan300
Board Regular
- Joined
- Jul 1, 2008
- Messages
- 71
Hi,
Hope someone can help. I have the following code...
relates to the formula =IF('Field Sales Manager'!$R$201>Commission!B14,"Yes","No"). The problem I have is that because its a formula, its not recognising the "Yes" and the code will not run.
So my question is, using the formula can I get the code to run?
Thanks
Hope someone can help. I have the following code...
Code:
Private Sub Worksheet_Calcualte(ByVal Target As Range)
Dim Cell As Range
If Target.Column <> 3 Then Exit Sub
Application.EnableEvents = False
For Each Cell In Target.Cells
With Cell
If .Value = "Yes" Then
.Offset(, 2).FormulaR1C1 = Date
Else
.Offset(, 2).ClearContents
End If
End With
Next Cell
Application.EnableEvents = True
End Sub
Code:
If .Value = "Yes" Then
relates to the formula =IF('Field Sales Manager'!$R$201>Commission!B14,"Yes","No"). The problem I have is that because its a formula, its not recognising the "Yes" and the code will not run.
So my question is, using the formula can I get the code to run?
Thanks