View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
u473 u473 is offline
external usenet poster
 
Posts: 184
Default Instr syntax help

I cannot find in all my doc the proper syntax for Instr to replace my
long
If Proj = "51693" Or Proj = "61121" Or Proj = "52401" Or ..... Then
with something like
If Instr(Proj,"51693 61121 52401 61151 61191 52231 52401") Then
But what is the proper syntax with quotes, spaces & commas ?

................
Range("A1").Select
Do
Proj = ActiveCell.Value
' Test the ActiveCell.Value against 10 allowed values
If Proj = "51693" Or Proj = "61121" Or Proj = "52401" Then
' Do something
End If
ActiveCell.Offset(1, 0).Select
Loop Until ActiveCell.Row LastRow
Thank you for your help
Celeste