Thread: strings
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default strings

Oops. Sorry about missing the VBA stuff.

You may want to use something like:

If InStr(1, ActiveSheet.Range("c13").Value, _
"5 card charlie", vbTextCompare) 0 Then

if you don't care about case.

(and I like to qualify my ranges...)

RobcPettit wrote:

Solved it. Used
If InStr(Range("c13"), "5 Card Charlie") Then
charlie = "5CC"
Else
charlie = ""
End If

Thankyou Regards Robert


--

Dave Peterson