In your recent exhibits there are no strings with numbers of 5 characters or more. Thus that LOOKUP method won't do the trick.
The MAX method however:
Excel 2010<TABLE style="BORDER-RIGHT: #bbb 1px solid; BORDER-TOP: #bbb 1px solid; BORDER-LEFT: #bbb 1px solid; BORDER-BOTTOM: #bbb 1px solid; BORDER-COLLAPSE: collapse; BACKGROUND-COLOR: #ffffff" cellPadding=2 rules=all><COLGROUP><COL style="BACKGROUND-COLOR: #dae7f5" width=25><COL><COL></COLGROUP><THEAD><TR style="COLOR: #161120; BACKGROUND-COLOR: #dae7f5; TEXT-ALIGN: center"><TH></TH><TH>A</TH><TH>B</TH></TR></THEAD><TBODY><TR><TD style="COLOR: #161120; TEXT-ALIGN: center">1</TD><TD>6 89 555 7 1 2655</TD><TD style="TEXT-ALIGN: right">2655</TD></TR><TR><TD style="COLOR: #161120; TEXT-ALIGN: center">2</TD><TD>10 500 2000</TD><TD style="TEXT-ALIGN: right">2000</TD></TR><TR><TD style="COLOR: #161120; TEXT-ALIGN: center">3</TD><TD>67 10000 15 6</TD><TD style="TEXT-ALIGN: right">10000</TD></TR><TR><TD style="COLOR: #161120; TEXT-ALIGN: center">4</TD><TD>500 15 5</TD><TD style="TEXT-ALIGN: right">500</TD></TR></TBODY></TABLE>
Sheet1
<TABLE style="BORDER-RIGHT: black 2px solid; PADDING-RIGHT: 0.4em; BORDER-TOP: black 2px solid; PADDING-LEFT: 0.4em; PADDING-BOTTOM: 0.4em; BORDER-LEFT: black 2px solid; PADDING-TOP: 0.4em; BORDER-BOTTOM: black 2px solid; BORDER-COLLAPSE: collapse; BACKGROUND-COLOR: #ffffff" cellPadding=2 rules=all width="85%"><TBODY><TR><TD style="PADDING-RIGHT: 6px; PADDING-LEFT: 6px; PADDING-BOTTOM: 6px; PADDING-TOP: 6px">
Array Formulas<TABLE style="BORDER-RIGHT: #bbb 1px solid; BORDER-TOP: #bbb 1px solid; BORDER-LEFT: #bbb 1px solid; BORDER-BOTTOM: #bbb 1px solid; BORDER-COLLAPSE: collapse; BACKGROUND-COLOR: #ffffff; TEXT-ALIGN: center" cellPadding=2 rules=all width="100%"><THEAD><TR style="COLOR: #161120; BACKGROUND-COLOR: #dae7f5"><TH width=10>Cell</TH><TH style="PADDING-LEFT: 5px; TEXT-ALIGN: left">Formula</TH></TR></THEAD><TBODY><TR><TH style="COLOR: #161120; BACKGROUND-COLOR: #dae7f5" width=10>B1</TH><TD style="TEXT-ALIGN: left">{=MAX(
--MID(SUBSTITUTE(" "&TRIM(A1)," ",REPT(" ",255)),255*ROW(INDIRECT("1:"&LEN(TRIM(A1))-LEN(SUBSTITUTE(TRIM(A1)," ",""))+1)),255))}</TD></TR></TBODY></TABLE>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself
</TD></TR></TBODY></TABLE>
Works!
The LOOKUP will work provided you have 5 character length numbers:
Excel 2010<TABLE style="BORDER-RIGHT: #bbb 1px solid; BORDER-TOP: #bbb 1px solid; BORDER-LEFT: #bbb 1px solid; BORDER-BOTTOM: #bbb 1px solid; BORDER-COLLAPSE: collapse; BACKGROUND-COLOR: #ffffff" cellPadding=2 rules=all><COLGROUP><COL style="BACKGROUND-COLOR: #dae7f5" width=25><COL><COL></COLGROUP><THEAD><TR style="COLOR: #161120; BACKGROUND-COLOR: #dae7f5; TEXT-ALIGN: center"><TH></TH><TH>A</TH><TH>B</TH></TR></THEAD><TBODY><TR><TD style="COLOR: #161120; TEXT-ALIGN: center">1</TD><TD>45 87653 45</TD><TD style="TEXT-ALIGN: right">87653</TD></TR><TR><TD style="COLOR: #161120; TEXT-ALIGN: center">2</TD><TD>89 26 785 98765</TD><TD style="TEXT-ALIGN: right">98765</TD></TR><TR><TD style="COLOR: #161120; TEXT-ALIGN: center">3</TD><TD>18975 6 648</TD><TD style="TEXT-ALIGN: right">18975</TD></TR><TR><TD style="COLOR: #161120; TEXT-ALIGN: center">4</TD><TD>654 12345 56446</TD><TD style="TEXT-ALIGN: right">56446</TD></TR></TBODY></TABLE>
Sheet1
<TABLE style="BORDER-RIGHT: black 2px solid; PADDING-RIGHT: 0.4em; BORDER-TOP: black 2px solid; PADDING-LEFT: 0.4em; PADDING-BOTTOM: 0.4em; BORDER-LEFT: black 2px solid; PADDING-TOP: 0.4em; BORDER-BOTTOM: black 2px solid; BORDER-COLLAPSE: collapse; BACKGROUND-COLOR: #ffffff" cellPadding=2 rules=all width="85%"><TBODY><TR><TD style="PADDING-RIGHT: 6px; PADDING-LEFT: 6px; PADDING-BOTTOM: 6px; PADDING-TOP: 6px">
Worksheet Formulas<TABLE style="BORDER-RIGHT: #bbb 1px solid; BORDER-TOP: #bbb 1px solid; BORDER-LEFT: #bbb 1px solid; BORDER-BOTTOM: #bbb 1px solid; BORDER-COLLAPSE: collapse; BACKGROUND-COLOR: #ffffff; TEXT-ALIGN: center" cellPadding=2 rules=all width="100%"><THEAD><TR style="COLOR: #161120; BACKGROUND-COLOR: #dae7f5"><TH width=10>Cell</TH><TH style="PADDING-LEFT: 5px; TEXT-ALIGN: left">Formula</TH></TR></THEAD><TBODY><TR><TH style="COLOR: #161120; BACKGROUND-COLOR: #dae7f5" width=10>B1</TH><TD style="TEXT-ALIGN: left">=LOOKUP(
9.99E+307,-IF(LEN(--MID(SUBSTITUTE(" "&TRIM(A1)," ",REPT(" ",255)),255*{1;2;3;4;5;6;7;8;9},255))>=5,-MID(SUBSTITUTE(" "&TRIM(A1)," ",REPT(" ",255)),255*{1;2;3;4;5;6;7;8;9},255),NA()))</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>