I have a tool that loops through rows of a dataset and display cells contents (job information) if the rest of that row matches criteria I have laid out in column A.
Instead of matching .value in this script, how could I implement something like InStr so it doesn't need to match a whole cell case, but could be a variable within a sentence or text string?
currently I would want this to incorporate the InStr feature, but I can't figure it out:
For Each cSkills In rSkills
If c.Value = cSkills.Value Then i = i + 1
Next cSkills
rest of script:
Sub Find_1_Skill()
Dim c As Range, r As Range
Dim row As Integer, i As Integer
Dim rSkills As Range, cSkills As Range
Dim JobCodeMatch As Integer, JobTitleMatch As Integer, CLevelMatch As Integer
Dim JobCode As String, JobTitle As String, CareerLevel As String
row = 2
JobCodeMatch = 2
JobTitleMatch = 2
CLevelMatch = 2
Set rSkills = Application.Selection
Set rSkills = Application.InputBox("Select Job Competencies in Column A", TitleID, rSkills.Address, Type:=8)
Do While row < 2400
i = 0
JobCode = Cells(row, 6).Value
JobTitle = Cells(row, 7).Value
CareerLevel = Cells(row, 14).Value
Set r = Range(Cells(row, 6), Cells(row, 336))
For Each c In r
For Each cSkills In rSkills
If c.Value = cSkills.Value Then i = i + 1
Next cSkills
Next c
If i = 1 Then
Cells(JobCodeMatch, 3) = JobCode
Cells(JobTitleMatch, 4) = JobTitle
Cells(CLevelMatch, 5) = CareerLevel
JobCodeMatch = JobCodeMatch + 1
JobTitleMatch = JobTitleMatch + 1
CLevelMatch = CLevelMatch + 1
End If
row = row + 1
Loop
End Sub

analyticswas in a sentence within a cell, this would still match those? I was under the impression it would only match to a job where the whole cell =analyticsRange.Findsearches the whole cell, parts of it, formulas, or values, depends on how it's configured - keep in mind that the optional parameters are "remembered" between calls, so it's best to supply them all when invoking it from VBA code, to avoid bad surprises.