The OP:-
extracts only the middle two numbers
^^^^^^
Harald:-
MID is a text function, so just for the fun of it a pure numeric approach
too:
As I pointed out, the original question was not succinct wrt exactly what
was to be returned, and besides that it was Saturday and Harald was bored.
:-)
--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03
----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------
"Michael Bednarek" wrote in message
...
On Sat, 19 Feb 2005 22:50:27 +0100, "Harald Staff"
wrote in microsoft.public.excel.misc:
MID is a text function, so just for the fun of it a pure numeric approach
too:
=INT(MOD(A1,1000)/10)
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.
Your function omits the leading zero.
"gregork" skrev i melding
...
From a four digit number I want to have a formula that extracts only
the
middle two numbers eg." 5062" would equal "06" or "4113" would equal
"11".
--
Michael Bednarek http://mbednarek.com/ "POST NO BILLS"