AnsweredAssumed Answered

What is the wildcard for VBscript?

Question asked by Dcamrine on Nov 3, 2014
Latest reply on Nov 3, 2014 by rfairhur24

I have a simple code example for catching values of the name name that have some values that are capitalized and some that are lower case:

 

  1. Dim X
  2. If InStr( [Reservoir],"bARNETT" ) OR InStr([Reservoir],"BARNETT") Then
  3. X = "BARNETT SHALE"
  4. else
  5. X = ""
  6. end if
  7. Expression = X

 

I would like to use a wildcard so I don't have to use the Or Statement. In the interest of standardizing oil and gas reservoir names for spatial analysis there has to be a quicker way then writing long "AND" "OR" arguments.

 

This is in VBscript because I couldn't see the "InStr" function or  a function like it in the python examples.

 

I tried the following:

  1. Dim X
  2. If InStr( [Reservoir],"%ARNETT" ) Then
  3. X = "BARNETT SHALE"
  4. else
  5. X = ""
  6. end if

And it didn't work.

 

As always any help is much appreciated!

Outcomes