mLis not the same as
ml. The unit
mlis defined, but
mLis not, so in your expression
$ans11 = FormulaWithUnits("$an1 mg/mL");the
mg/mLis not recognized as a unit by
FormulaWithUnits, and the expression is treated as a plain formula, in which
mLwould be variables. But these aren't defined, so it reports that error.
If you switch to
$ans11 = FormulaWithUnits("$an1 mg/ml");that should work.