Modonnell43
New Member
I am struggling to modify this code (below) to handle fuzzy matches, e.g., treating words like dog, dogs, Dog, and Dogs the same. Any suggestion as to how I can modify this code to do this?
————
Function Count_Positives(Sentence As String, Positive_Words As Range) Dim Counter As Integer
For x = 1 To Positive_Words.Rows.Count Counter = Counter + (Len(Sentence) - _ Len(Replace(Sentence, Positive_Words(x), ""))) _ / Len(Positive_Words(x)) Next x Count_Positives = Counter
End Function
————
Function Count_Positives(Sentence As String, Positive_Words As Range) Dim Counter As Integer
For x = 1 To Positive_Words.Rows.Count Counter = Counter + (Len(Sentence) - _ Len(Replace(Sentence, Positive_Words(x), ""))) _ / Len(Positive_Words(x)) Next x Count_Positives = Counter
End Function