When only a part of the property is ordered to be sold, the whole of an estate for life or years in an undivided share of the property may be set off in any part of the property not ordered to be sold.