If your formulae field is 'static' you cannot change its value by script.But if you make the field "dynamic" you can change its value by script eventhough it is not editable.