Search code examples
excelexcel-formulaexcel-2013

TEXT operator in Excel


Why does =TEXT(16,"TEMP000") return a #VALUE error? I am trying to get TEMP016 as the result.

I have tried it with other alphanumeric examples, like =TEXT(16, A092000) which should show A092016, and it works fine there.


Solution

  • You need to mask the format string like

    =TEXT(16;"\t\e\mp000")
    

    since otherwise the letters t, e, and m would have some special meaning in this format string.