Thread: better way
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
[email protected] bplumhoff@gmail.com is offline
external usenet poster
 
Posts: 136
Default better way

Hello,

Sorry, no. This would accept any r starting with "K", "Q" or "J" (i
being 2).

Maybe
If i = 2 And Application.WorksheetFunction.Match(r, _
Array("K", "Q", "J", r), False) < 4 Then
...
End If

or just

If i=2 and (r="K" or r="Q" or r="J") then
...
end if


Regards,
Bernd