Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a search function that I intend to use for several variables. I wonder
how you write the search function so that you do not get error if search is unsuccessful but rather an informative message box or likewise. My code so far is: Private Sub findQC() Dim rng As Range Dim findVal As String Dim i As Integer Set rng = Worksheets("Dimension").Cells.Find("qc", LookIn:=xlValues) i = 0 Do Until IsEmpty(rng.Offset(i + 1, 0)) = True i = i + 1 Loop End Sub It is the Set rng = ... that fails if search is unsucessful. Very thakful for fast assistance. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
search a row for a word and if found | Excel Worksheet Functions | |||
SEARCH function returning #VALUE! error | Excel Discussion (Misc queries) | |||
File or function not found error | Excel Programming | |||
The search key was not found error | New Users to Excel | |||
Trim Function - Error Library Not Found | Excel Programming |