(Solved) – VBA Script to Delete Column Values based on other Column Values – Getting Type Mismatch

(solved)-–-vba-script-to-delete-column-values-based-on-other-column-values-–-getting-type-mismatch

I have a problem with the following command, as I’m getting a

Runtime error 13 Time Mismatch

in this part:

If Cells(i, "BL").Value = "Started" Then, below the code, what can I change in order for it to run?

Pretty much want to look for the work Started in all the rows in column BL and if so, delete the information in the same row in column AH


    Dim myLastRow As Long
    Dim i As Long
    Application.ScreenUpdating = False
    'Find last row
    myLastRow = Cells(Rows.Count, "BL").End(xlUp).Row
    ' Loop through range
    For i = 2 To myLastRow
        ' If Cells(i, "BL").Value = "Started" Then Range(Cells(i, "AH")).ClearContents
        If Cells(i, "BL").Value = "Started" Then Cells(i, "AH").ClearContents
    Next i
    Application.ScreenUpdating = True


End Sub

Leave a Reply

Your email address will not be published. Required fields are marked *