Replacing materials and formulas

You can replace materials with materials, materials with formulas, and formulas with materials.