You can use a user defined function. Here's what i came up to:
Function FunNumber(RngTarget As Range, Optional BlnReportAsNumber As Boolean = True, Optional BytPlacement As Byte = 1)
'Declarations.
Dim StrValue As String
Dim BytPosition As Byte
Dim StrString01 As String
'Setting.
StrValue = RngTarget.Cells(1, 1).Value
'Covering each character in StrValue.
For BytPosition = 1 To Len(StrValue)
'Removing any non-numerica character from StrValue.
If Not IsNumeric(Mid(StrValue, BytPosition, 1)) Then
StrValue = Left(StrValue, BytPosition - 1) & " " & Right(StrValue, Len(StrValue) - BytPosition)
End If
Next
'Removing leading and trailing spaces from StrValue.
StrValue = Trim(StrValue)
'Covering each character in StrValue but the last one.
For BytPosition = 1 To Len(StrValue) - 1
'Removing any multiple space.
If Mid(StrValue, BytPosition, 2) = " " Then
StrValue = Left(StrValue, BytPosition - 1) & " " & Right(StrValue, Len(StrValue) - BytPosition - 1)
BytPosition = BytPosition - 1
End If
Next
'Setting FunNumber.
FunNumber = ""
CP_Small_Number_Removed:
'Covering each section of StrValue marked by a space.
For BytPosition = 0 To UBound(Split(StrValue, " "))
'Setting StrString01 as section of StrValue marked by space.
StrString01 = Split(StrValue, " ")(BytPosition)
'Checking for a number smaller than 100000.
If Len(StrString01) < 6 Then
'Removing the number smaller than 100000.
Select Case BytPosition
Case Is = 0
StrValue = Right(StrValue, Len(StrValue) - Len(StrString01) - 1)
GoTo CP_Small_Number_Removed
Case Is < UBound(Split(StrValue, " "))
StrValue = Replace(StrValue, " " & StrString01 & " ", " ")
GoTo CP_Small_Number_Removed
Case Is = UBound(Split(StrValue, " "))
StrValue = Left(StrValue, Len(StrValue) - Len(StrString01) - 1)
GoTo CP_Small_Number_Removed
End Select
End If
Next
'Setting FunNumber.
FunNumber = Split(StrValue, " ")(BytPlacement - 1)
'Resetting FunNumber as number if needed.
If BlnReportAsNumber = True Then
FunNumber = FunNumber * 1
End If
End Function
Place it in a module. Let's say you string is in cell A1. In another cell write =FunNumber(A1)
and you should obtain the desired result. If you want it reported as text (maybe leading zeroes are important) you can write =FunNumber(A1,FALSE)
. If there are more than one number greater than 100000 and you want to find for example the second, write something like =FunNumber(A1,,2)
(you can of course specify if you want a string or a number while also specifying that you want the second or third or whatever number) .If no number greater than 100000 is found then the function returns #VALUE error.