Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Everyone,
In VBA, I'm searching for a substring in a cell using worksheet function FIND. If FIND does not find the substring it returns a #Value (instead of 0 which is what I want) I'm not sure how to handle this. here's my code... .... With ActiveWorkbook.Worksheets("Sheet1") Do While Not IsEmpty(Cells(i, 1)) If (Application.WorksheetFunction.Find("xyz", Cells(i, 7)) < 0) Then Worksheets("Sheet2").Cells(j, 1) = Worksheets("Sheet1").Cells(i, 1) i = i + 1 j = j + 1 End If Loop End With If "xyz" does not exist, the code crashes. =( instead of just continuing Thanks As Always!!! Kurt |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to handle something like this | Excel Discussion (Misc queries) | |||
what is "fill handle". i don't see any fill handle in my excel | New Users to Excel | |||
Fill handle turned into a move handle | Excel Discussion (Misc queries) | |||
Am I trying to do something that Excel cannot handle? | Excel Discussion (Misc queries) | |||
Not sure how to handle this | Excel Programming |