Q: If/then VBScript/Python code equivalent to SQL IN ('x','y',z') expression in ArcGIS Field Calculator? we need just like the following, only with multiple records selected... have tried the "xyz" in (1,2,3,4,5) SQL code but of course VB Script wants something else.
dim f2
if [field1] = "foo" then
  f2 = "bar"
end if

Screen shot of this being used in the field calculator.


A: If you like SQL, you can apply a Definition Query:
IN('x','y','z')

then process your field calculator results. Only the filtered records will be modified.

If you want Python, it will look similar to the SQL:
if !field1! in ("x","y","z"):
    f2 = "field1 is yep"

[Added as solution] Or as a 1-liner without any preprocessing required:
'yes' if !field1! in ('x','y','z') else ''


A: It appears that you're trying to conditionally calculate the value of field 2 based on the value of field 1.  you could do the entire operation in a python script using a combination of Mike's suggestion and an UpdateCursor something like this:
cursor = gp.UpdateCursor(yourfeatureclass)
row = cursor.Next()

while row:
     for row.GetValue("yoursourcefield") in ["foo", "bar", "snafu"]:
          row.YOURTARGETFIELD = "your target value"
     cursor.UpdateRow(row)
     row = cursor.Next()

otherwise, using just the pre-logic and the calculator, if it's just a boolean check, personally I'd do the inverse of what Mike suggested:
if [field1] not in ["x","y","z"]:
     [field2] = "NO WAY JOSE"
else:
     [field2] = "shoot'em up cowboy"

