Can I substitute margarine for butter in a butter cookie recipe?
Yes. The few people out there who prefer margarine to butter will thank you. The masses of people who believe that margarine is "healthier" than butter will congratulate you. But the entire staff of Ochef will weep softly to themselves and hope that you reconsider your intentions.
Margarine and butter have the same relative makeup of fat and water, so you can generally substitute one for the other with no diminution of quality (other than taste).
Difference Between Butter and Margarine
Using Butter, Margarine, or Shortening in Cookies