Yes. You will need to preface the variable names with "::" so the column formula can see the values. For example:
lower_limit = 0;
upper_limit = 100;
data table(dtname) << New Column( "PassFail",
Character, Nominal,
Formula( If( ::lower_limit < AColumnName < ::upper_limit, "pass", "fail" ) ),
Lock( 1 )
);