That MID() is a text function doesn't seem to matter - TEXT() seems
implied. To wit: =MID(5062,2,2) gives 06 which is what the OP wanted.
Relax man. Solutions posted here are also archived and used by readers which
may have slightly different needs, so alternate approaches to a problem is
always good and nothing to get worked up about. I know your solution works
fine and that it probably solved the initial problem. Just wanted to say
that a text approach to number material is not the only way to go. Text
functions are e.g. nothing but trouble when we calculate date and time..
Your function omits the leading zero.
As we both know, 6 and 06 is the same number. Custom number format 00 will
display one digit integers with a leading zero.
Best wishes Harald