Hi! I can't solve a problem, and I would be really gladful if somebody could help me with my code. While debugging, it jumps a huge. What can be the problem?
Cells(j,g).Value = "anxious"
temp = "anxiety"
Cells(j,g).Value = "anxious"
temp = "anxiety"
Code:
If Left(temp, 3) = Left([B]Cells(j, g).Value[/B], 3) Then [U][COLOR=#008000]'It's true, code goes on (anx = anx)[/COLOR][/U]
For k = Len(temp) To 2 [U][COLOR=#008000]'here code jumps a huge...[/COLOR][/U]
testVariable= Mid([COLOR=#ff0000]temp[/COLOR],1,k-1) 'IT STAYS EMPTY
If InStr(1, [B]Cells(j, g).Value,[/B] Mid([COLOR=#ff0000]temp[/COLOR], 1, k - 1)) >= 1 Then
'I want to loop from the last character of temp (anxiety), and find the most similar word. So
' InStr(1,"anxious", mid("anxiety",1,k-1) -->
'can it find "anxiet" in "anxious"? NO so goes on.
'can it find "anxie" in "anxious"? NO so goes on.
'can it find "anxi" in "anxious"? YES so stores "anxiety" in Cells(i,f).Value
[I]Cells(i, f).Value[/I] = [B]Cells(j, g).Value [/B]
GoTo Skip
End If
Next
End If [U][COLOR=#008000]'.. and code lands here[/COLOR][/U]
Skip: ...