View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Charlie Charlie is offline
external usenet poster
 
Posts: 703
Default Wildcards in VBA

Try using Instr:

If InStr(Cells(1, 1), MyStr) 0 Then MsgBox "Found it"



"oodam" wrote:


I'm trying to use a formula that will check the contents of a cell and
color the cell's row accordingly. However, the "keywords" that I'm
looking for won't be the only thing in the cell - they will most likely
be part of a sentence.
With regular formulas, I found that just putting asterisks around the
keywork insde quotation marks works fine. In VBA, though, that doesn't
seem to work.
Any ideas?


--
oodam
------------------------------------------------------------------------
oodam's Profile: http://www.excelforum.com/member.php...o&userid=35513
View this thread: http://www.excelforum.com/showthread...hreadid=553317