Consulting

Results 1 to 3 of 3

Thread: Solved: Copy formula automatically & Paste valuse :VBA code error Rectification

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Solved: Copy formula automatically & Paste valuse :VBA code error Rectification

    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

    [VBA]
    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
    [/VBA]
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •