View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Shorter 'Or' Statement?

select case lcase(activesheet.range("B" & currow).value)
case is = "x","o"
'do something
case else
'do something else
end select



Bigfoot17 wrote:

I have the following line working, but it seems that perhaps the line could
be shortened:
If Range("B" & CurRow) = "X" Or Range("B" & CurRow) = "x" Or Range("B" &
CurRow) = "O" Or Range("B" & CurRow) = "o" Then
If I needed to add a few more acceptable characters would I continue adding
more 'or' statements or can I try another method?

Thanks.


--

Dave Peterson