Many commercial real-estate investors were thrilled that one of their favorite tax provisions—1031 exchanges—survived the recent tax overhaul.

Under Section 1031, investors can exchange properties and defer capital-gains tax that would otherwise be due. That allows many investors to trade up into more expensive properties.

Like-kind exchanges are limited to property used for business or held as an investment. Those who complete an exchange and follow the rules get to defer taxes due. Before the tax change this year, like-kind exchanges were allowed for any type of business or investment property, including artwork or collectibles. Today, however, exchanges are allowed for real estate only.

The good news: All real estate is treated the same. So you can swap an apartment building in New York City for a vineyard in Napa.

A seller of business or investment real estate planning to do a 1031 has 45 days from the sale of the property to identify replacement properties. The replacement property must be received and the exchange completed within 180 days of the sale.

Like-kind exchanges are particularly useful for investors who had been active managers of, say, an apartment building, who may want to stay invested in real estate, but own something that’s a more passive investment, such as a net-leased drugstore or restaurant.