View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected][_2_] rumkus@hotmail.com[_2_] is offline
external usenet poster
 
Posts: 60
Default exact match in a string

i1 = " week1, week2, week5, week16, week18, week24 "

i2 = " week16 "

If InStr( i1, i2 ) 0 Then

When I put above code in a loop to check all rows in my sheet not only
" week16 " responds but also " week1 " comes in.

How can I avoid "week1" ?
Or " week2 " while looping for " week24" ?

Any idea ? Thank you very much.