Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello all, I'm having problems with the code below. The purpose of
the code is to check column A cell content for "Delete" which is populated by a vlookup formula. The problem is if an account is not found then the cell is populated with #N/A and causes a run-time error '13: type mismatch. Any ideas on correcting this? Appreciate your assistance, Ron Sub DeleteSTBAccounts() Dim RowNdx As Long Dim LastRow As Long application.ScreenUpdating = False ActiveSheet.Rows.Hidden = False LastRow = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row For RowNdx = LastRow To 1 Step -1 If Cells(RowNdx, "A") = "Delete" Then Rows(RowNdx).EntireRow.Delete End If Next RowNdx range("A1").Select End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Getting Run-time error although code looks correct | Excel Programming | |||
Problem w/ Code- Error 91 @ run-time | Excel Programming | |||
Run-time error '9' ---- Code to fix included. | Excel Programming | |||
Run-time error from my code | Excel Programming | |||
Code Error - Run Time Error 5 (Disable Cut, Copy & Paste) | Excel Programming |