In most recipes, yes. You can easily replace butter with ghee by simply substituting the later in equal proportions. Honestly, ghee is a much better option when it comes to frying or sauteing anything. Also, ghee is unsalted and hence is perfectly suitable for sweet dishes.