LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Best/Easiest way to search/find in a string

I know a few ways to search or find terms in a string, but what method
is the best/quickest/easiest?

For example, if I have a string and want to find a different string
within that.

I want to see if the string:

"TEMP(302)WPRDRAMT|input_range = "0" "999999.99" ; |MaxInput = 10|"

Contains the string:

"input_range"

And if so I want to extract the terms "0" and "999999.99".

The way I've done this is the past (being new to VBA) is to loop
through the string and pull out substrings in blocks the same length
as the string I'm searching for (using MID) until I get a match, but
is there a SEARCH/FIND etc command in VBA?

I'd then use the " as delimiters to get the two numeric values I'm
after, but again is there a better way than using MID and stepping
through the string character by character?

Thanks.

(I've not explained that very well so please question me if you need
clarification)

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find specific info using search string using VBA laavista Excel Discussion (Misc queries) 5 May 20th 09 07:59 PM
Easiest way to find differences between Rows? Jonathan Excel Discussion (Misc queries) 3 February 20th 09 08:51 PM
Search/Match/Find ANY part of string to ANY part of Cell Value TWhizTom Excel Worksheet Functions 0 July 21st 08 08:16 PM
FIND / SEARCH text compare cell to string in 3rd cell nastech Excel Discussion (Misc queries) 0 October 29th 07 02:51 AM
search a string withing a string : find / search hangs itarnak[_9_] Excel Programming 4 October 24th 05 03:19 PM


All times are GMT +1. The time now is 03:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"