Yes, you can! You can substitute butter for oil using a 1:1 ratio. This ratio works when the recipe calls for vegetable oil, canola oil, olive oil, and coconut oil.  When it comes to using butter, first melt the butter and then allow it to cool before combining it with the rest of the wet and dry ingredients. If the recipe calls for ½ cup of oil, use ½ of melted and cooled butter, preferably unsalted.