No. For getting exemption the nature of property sold is relevant. If you have sold a residential property, the gain received on sale should be reinvested in another residential property [which may include land and building] to qualify for exemption [section 54]. Even if you have sold a property other than a residential property, you will qualify for exemption only if the net consideration is reinvested in a residential property which may include land and building [section 54F].
Sale, Profit from sale, Date, reinvestment We have explained the condition of tax exemption if profit from sale is reinvested.