some numbers don't show up find 3

looking for V_OUT sheet

for example im looking for 467

appear 7 times in each column
65434677665v1--1-___121.xlsm
ADRIANA PACCOUNTING ASSISTANTAsked:
Who is Participating?
 
Rgonzo1971Connect With a Mentor Commented:
Hi,

pls try
Sub Find3V()

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 3-digit number to find")
If Len(strFind) <> 3 Then
    MsgBox "You must enter 3 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) & "*" & Mid(strFind, 2, 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

Corrected

Regards
65434677665v2.xlsm
1
 
Martin LissOlder than dirtCommented:
Try this.
29079145.xlsm
1
 
Martin LissOlder than dirtCommented:
Rgonzo beat me by 8 minutes so give full credit to him especially since I used the clever method he used to fix the 'Find 2' in your previous thread.
1
 
ADRIANA PACCOUNTING ASSISTANTAuthor Commented:
Great Job  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.