Modonnell43
New Member
- Joined
- May 26, 2018
- Messages
- 1
I’m 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?
————
————
Code:
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
Last edited by a moderator: