Thread: better way
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected][_2_] RobcPettit@yahoo.co.uk[_2_] is offline
external usenet poster
 
Posts: 80
Default better way

Hi, is ther a better way of writing this.
If r = "K" And i = 2 Or r = "Q" And i = 2 Or r = "J" And i = 2 Then
r1 = 10 + i
y = i
x = 112
end if.

As you can see i always = 2 but r can be a k,q, or j. This way works
perfect, just thinking that there may be a better way. I was thinking
something like if r = k/q/j.
regards Robert