No, you are not excluded from the home sale exclusion because it was a rental. If you lived in the home for 2 out of the last 5 years and have not claimed the home sale exclusion in the last 2 years for another home, then you would still be able to claim the home sale exclusion even though it was rented out the rest of the time.
You will need to add back the depreciation you claimed over the last few years as a depreciation recapture which will decrease your basis and increase your profit on the sale.
**Say "Thanks" by clicking the thumb icon in a post
**Mark the post that answers your question by clicking on "Mark as Best Answer"