hi thank uCode:Select Case cell.Value Case "aaa", "bbb", "ddd", "fff" 'your code here Case "ccc", "eee" 'your code here End Select
As far as I know there isn't a way to do it as concisely as you are indicating. However, if you were a bit more specific about just what you have and what you are trying to achieve, some other suggestions might come along.Hi all,
how can i have multiple like criterias?
i.e
if cell.value like ??? Or ??? Or ??? Etc...
rather than writing the like statement multiple times
something like this. Like{aaa,bbb,ddd,fff} etc....
Thanks
Yes, I understood that, and I have answered that as best I can.Hi Peter
all it was that i wanted to search for a text strings but it could have text before it so i wondered if i can do a multiple search like criteria
if cell.value like "*aa" or "*bb" etc...
Dim I As Integer
Dim Pos As Integer
Dim FindChar As String
Dim SearchString As String
For A = 1 To 254 'TEXAS HAS 254 COUNTIES
R = "D" & A
j = "a" & A
C = "c" & A
SearchString = Sheet1.Range(j)
FindChar = " "
For I = 1 To Len(SearchString)
If Mid(SearchString, I, 1) = FindChar Then Pos = I
Next I
Sheet1.Range(R) = UCase(Left$(SearchString, Pos))
Sheet1.Range(C) = A
Next A