A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Formulas cannot retrieve the formatting, only the data. Once you have entered the formula, copy the cell and then paste/special/values back into the cell.
Then apply formatting to the pieces of text as you desire.