Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
runtime error 13
I have a list of sorted names (some repeat) and am trying to find the first
row a name occurs and the last row a name occurs. Sometimes the name (DBName) is not in the list. When the name is not in the list, I get the runtime error 13. I guess its because #N/A is being assigned to DBRowNumFirst. How do I get around this problem? Dim DBName As String Dim DBRowNumFirst, DBRowNumLast, DBRows As Integer DataRows = Cells(Rows.Count, 1).End(xlUp).Row DBRowNumFirst = Application.Match(DBName, Range("A3:A" + CStr(DataRows)), 0) DBRowNumLast = Application.Match(DBName, Range("A3:A" + CStr(DataRows)), 1) |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
runtime error '1004' application or object defined error | Excel Programming | |||
runtime error 13 - type mismatch error in Excel 97 on Citrix | Excel Programming | |||
runtime error '1004' application or object defined error. Please help | Excel Programming | |||
Excel 2003 Macro Error - Runtime error 1004 | Excel Discussion (Misc queries) | |||
Syntax Error Runtime Error '424' Object Required | Excel Programming |