Hi all,
I am having trouble with one part of a piece of code where I want to say if the value in a certain cell is equal to one of multiple values and I think there must be a better way to do it. Right now I have a ridiculous number of or statements and it looks something like this:
Anyone have any suggestions?
Can I use a wildcard in some way like "B*"?
Thanks in advance!
Ryan
I am having trouble with one part of a piece of code where I want to say if the value in a certain cell is equal to one of multiple values and I think there must be a better way to do it. Right now I have a ridiculous number of or statements and it looks something like this:
Code:
If ECpresent.Offset(1, -14).Value = "B01" _
Or ECpresent.Offset(1, -14).Value = "B02" _
Or ECpresent.Offset(1, -14).Value = "B03" _
Or ECpresent.Offset(1, -14).Value = "B04" _
Or ECpresent.Offset(1, -14).Value = "B05" _
Or ECpresent.Offset(1, -14).Value = "B06" _
Or ECpresent.Offset(1, -14).Value = "B07" _
Or ECpresent.Offset(1, -14).Value = "B08" _
Or ECpresent.Offset(1, -14).Value = "B09" _
Or ECpresent.Offset(1, -14).Value = "B10" Then
Anyone have any suggestions?
Can I use a wildcard in some way like "B*"?
Thanks in advance!
Ryan