It is OK to swap in most recipes, but there are situations, such as baking, where it may cause a problem with your final product. Butter and coconut oil are solid at room temperature, whereas oils such as olive oil, vegetable oil, and MCT canna oil stay liquid at room temperature.