tom just posted this earlier today to help someone out.
see if it helps you
Option Explicit
Dim rng As Range, rng1 As Range
Dim myVar As String
Sub test()
myVar = "this is load1"
Set rng = Range("a1:a13")
Set rng1 = rng.Find(myVar)
If Not rng1 Is Nothing Then
MsgBox myVar & " found at " & rng1.Address
Else
MsgBox myVar & " was not found in " & rng.Address
End If
End Sub
--
Gary
"nelg" wrote in message
...
G'day guys, I know there is a simple answer to this. I am searching a
column of values and want to stop when I hit a certain string of text.
Problem is it will be in larger string.
example: in the below example I find the load case (say load1) but
load1 is in a larger string.
this is load1
401
405
410
417
418
this is load2
404
407
413
415
418
419
thanks for your help.
--
nelg
------------------------------------------------------------------------
nelg's Profile:
http://www.excelforum.com/member.php...o&userid=27771
View this thread: http://www.excelforum.com/showthread...hreadid=495415