satish gubbi
10-22-2012, 12:59 AM
Hi
I have below code that needs to be rectified, while its getting executed automatically, I am getting message as below.
And this code is copying formula, I need this to copy only values (result of formula which is not working here.
attached file for your reference. Kindly help
Error message
Run time error '13':
Type mismatch
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim iRow As Long
With Worksheets("Email Tracker")
If Target.Columns = "Completed" Then
iRow = .Cells(.Rows.Count, "F:F").End(xlUp).Row
With .Range("H5", .Cells(iRow, "H"))
.Formula = "=IF(RC[-2]=""Completed"",NOW(),"""")"
.Value = .Value
End With
End If
End With
End Sub
I have below code that needs to be rectified, while its getting executed automatically, I am getting message as below.
And this code is copying formula, I need this to copy only values (result of formula which is not working here.
attached file for your reference. Kindly help
Error message
Run time error '13':
Type mismatch
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim iRow As Long
With Worksheets("Email Tracker")
If Target.Columns = "Completed" Then
iRow = .Cells(.Rows.Count, "F:F").End(xlUp).Row
With .Range("H5", .Cells(iRow, "H"))
.Formula = "=IF(RC[-2]=""Completed"",NOW(),"""")"
.Value = .Value
End With
End If
End With
End Sub