Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
n,
Check out the InStr function in VBA help. Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Text string to Numeric string | Excel Discussion (Misc queries) | |||
Nested formula to search a text string and return specific text | Excel Worksheet Functions | |||
Change 3 letter text string to a number string | Excel Discussion (Misc queries) | |||
Splitting a text string into string and number | Excel Discussion (Misc queries) | |||
want to remove all text characters equal to one character in length from text string | Excel Worksheet Functions |