Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help! Searching for text with more than one criteria


you can use the AND function in the IF statement at the top to defin
multiple instances of the INSTR(...) test (or the OR function etc..)


i.e.

If InStr(1, data, texttofind) AND InStr(1, data, texttofind2) Then
...
...
ENDIF

where texttofind2 is your second search criteria.

if you want to seach for a string but don't know what you will b
looking for when writing the code then a simple INPUT box statement ca
receive you text without the need for a dialogbox with all th
associated code:

texttofind = INPUTBOX ("Enter Search Text"

--
optionbase
-----------------------------------------------------------------------
optionbase1's Profile: http://www.excelforum.com/member.php...fo&userid=2521
View this thread: http://www.excelforum.com/showthread.php?threadid=38799

Reply
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
Searching for Data of a certain criteria jinga Excel Discussion (Misc queries) 3 August 1st 10 04:21 AM
Formula for searching 3 criteria Craig Excel Discussion (Misc queries) 4 February 18th 09 01:22 PM
Formula for searching 3 different Criteria Craig Excel Discussion (Misc queries) 1 February 9th 09 04:34 PM
Searching for records with multiple criteria Jeff Excel Worksheet Functions 7 December 11th 08 10:07 PM
Searching two columns against a specific criteria Colin Excel Worksheet Functions 2 July 10th 07 07:20 PM


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

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

About Us

"It's about Microsoft Excel"