some numbers don't show up

looking for V_OUT sheet

for example im looking for 65 it appear 8 times

but when hit find 2 it only show 3 times
65434677665.xlsm
ADRIANA PACCOUNTING ASSISTANTAsked:
Who is Participating?
 
Rgonzo1971Commented:
pls try
Sub Find2V()

Dim strFind As String
Dim lngRow As Long
Dim lngCol As Long
Dim intTot As Integer
Dim intCount As Integer
Dim intSets As Integer

Sheets("V_OUT").Range("A6").EntireRow.Clear

strFind = InputBox("Enter 2-digit number to find")
If Len(strFind) <> 2 Then
    MsgBox "You must enter 2 numbers"
    Exit Sub
End If

For lngCol = 3 To ActiveSheet.UsedRange.Columns.Count Step 2
    For lngRow = 14 To 200
        If Cells(lngRow, lngCol) <> Empty Then
            If Cells(lngRow, lngCol) Like "*" & Left(strFind, 1) & "*" & Right(strFind, 1) & "*" Then
                intCount = intCount + 1
                intTot = intTot + 1
            End If
        End If
    Next
    If intCount > 0 Then
        Cells(6, lngCol) = intCount
        Cells(6, lngCol).Interior.Color = 13561798
        intSets = intSets + 1
    End If
    intCount = 0
Next
Range("A4") = strFind
Range("A6") = intSets
Range("B1") = ColumnsWithData
Range("B6") = intTot
Range(Cells(6, "A"), Cells(6, ActiveSheet.UsedRange.Columns.Count)).HorizontalAlignment = xlCenter
'UpdateHistory
End Sub

Open in new window

65434677665v1.xlsm
1
 
Rgonzo1971Commented:
Hi,

I only see 3 time 65

Could you tell in which cells the 8 are?

Regards
1
 
ADRIANA PACCOUNTING ASSISTANTAuthor Commented:
Rgonzo1971

Thanks ! for the fast response

well   each column have to be analyze

the 65 an be in any position of the 3 numbers

for example  56X  6x5 65  ect..

787878777878878.PNG
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
ADRIANA PACCOUNTING ASSISTANTAuthor Commented:
787878777878878.PNG
0
 
ADRIANA PACCOUNTING ASSISTANTAuthor Commented:
65x  6x5 5x6 56x x65 x56  

any combination with the 3 digit   if 5 and 6 are then  need to be count
0
 
ADRIANA PACCOUNTING ASSISTANTAuthor Commented:
Rgonzo1971

Working As needed !

Great Expert !!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.