# Look For 2 digit

Have this solution working as needed
then need an 2 digit button to look for

for example

need to look for 89

then need show all numbers combinations with 89 in any location
xx89, 89xx, 8x9x, 9x8x,  ect....

results in  PAIR_OUT sheet
29075976a.xlsm
###### Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:
Hi,
same code but only comment these lines:
'If Len(strFind) <> 3 Then
'    MsgBox "You must enter 3 numbers"
'    Exit Sub
'End If

so it will become

``````Sub Find3()

Dim strFind As String
Dim lngRow As Long
Dim lngCol As Long
Dim lngNewRow As Long
Dim intCount As Integer

Sheets("DTA_OUT").UsedRange.Cells.Offset(3, 0).ClearContents
lngNewRow = 4
strFind = InputBox("Enter 3-digit number to find")
'If Len(strFind) <> 3 Then
'    MsgBox "You must enter 3 numbers"
'    Exit Sub
'End If

For lngRow = 14 To 200
For lngCol = 3 To ActiveSheet.UsedRange.Columns.Count
If Cells(lngRow, lngCol) <> Empty Then
If InStr(1, Cells(lngRow, lngCol), Mid\$(strFind, 1, 1)) > 0 And _
InStr(1, Cells(lngRow, lngCol), Mid\$(strFind, 2, 1)) > 0 And _
InStr(1, Cells(lngRow, lngCol), Mid\$(strFind, 3, 1)) > 0 Then
Sheets("DTA_OUT").Cells(lngNewRow, "A") = Cells(lngRow, lngCol)
Sheets("DTA_OUT").Cells(lngNewRow, "B") = Split(Cells(1, lngCol).Address, "\$")(1)
intCount = intCount + 1
lngNewRow = lngNewRow + 1
End If
End If
Next
Next
Sheets("DTA_OUT").Cells(lngNewRow + 1, "A") = "Found " & intCount
Sheets("DTA_OUT").Activate
End Sub
``````
ACCOUNTING ASSISTANTAuthor Commented:
abbas abdulla   Thanks Very Much for the fast reponse

can you provide an example ??
Older than dirtCommented:
Here. There was another thing that also needed to be changed.
29075985.xlsm

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

ACCOUNTING ASSISTANTAuthor Commented:
Martin Liss great JOB

abbas abdulla  great JOB

Thanks Very Much Experts!
And Very Happy New Year !!
###### It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Applications

From novice to tech pro — start learning today.