Learn when you want, where you want with convenient online training courses. Sign up now!
[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More
Experts Exchange Solution brought to you by
"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.
Dim strFind As String
Dim lngRow As Long
Dim lngCol As Long
Dim intTot As Integer
Dim intCount As Integer
Dim intSets As Integer
strFind = InputBox("Enter 3-digit number to find")
If Len(strFind) <> 3 Then
MsgBox "You must enter 3 numbers"
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
If intCount > 0 Then
Cells(6, lngCol) = intCount
Cells(6, lngCol).Interior.Color = 13561798
intSets = intSets + 1
intCount = 0
Range("A4") = strFind
Range("A6") = intSets
Range("B1") = ColumnsWithData
Range("B6") = intTot
Range(Cells(6, "A"), Cells(6, ActiveSheet.UsedRange.Columns.Count)).HorizontalAlignment = xlCenter
Open in new window
Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.