This isn't a one answer fits all situation. It depends on your house and how it is constructed. Do you have easy access to the drain from an unfinished basement, or is the house on a slab? Perhaps replacement may not be necessary, depending on the extent of the damage to the flange. Flange repair kits are sold in the plumbing section of the big box stores. You might check this out.