This would be a custom number format. There's no worksheet function which returns a cell's full number format. CELL("format") is stuck mimicking the functionality of Lotus 1-2-3 Release 2.x from the mid-1980s, so it's not useful for this. You could use the XLM function GET.CELL in defined names, but that's inflexible.
Which leaves VBA as the best means for accessing a cell's .Text property. Note: changing number formats does NOT trigger recalculation at all, so even making user-defined functions (UDFs) volatile won't make formulas recalculate when number formats change. Meaning if you want to use such UDFs, you're going to need to develop the habit of pressing [F9] early & often.
Anyway, as a UDF,
The formula =gettext(X99) should return exactly what's displayed in cell X99 except for colors and font effects like boldface, italics, font size.
Bookmarks