Deductions & credits

If you cannot use the personal residence exclusion on the sale then what you do with the proceeds  is irrelevant  to the capital gain you have on the personal residence.