I need an expression such that Global_Name_dict(CurrentRow(“EMP ID”).ToString.Trim) contains CurrentRow(“Employee Name”).ToString.Trim Igroning cases And Ignoring Arrangement
For example
Global_Name_dict(CurrentRow(“EMP ID”).ToString.Trim)=“Kancharla Mahija Cherry Blossom”
and
CurrentRow(“Employee Name”).ToString.Trim=“Mahija blossom kancharla”
then the condition must return True that is the expected solution
Try this:
If
Global_Name_dict.ContainsKey(CurrentRow("EMP ID").ToString.Trim) AndAlso Global_Name_dict(CurrentRow("EMP ID").ToString.Trim).Equals(CurrentRow("Employee Name").ToString.Trim, StringComparison.OrdinalIgnoreCase)
Then
Msg Box-> "True"
Else
Msg Box-> "False"
End If
Hope it helps
Hi,
How about the following?
strA.ToLower.Split(" "c,StringSplitOptions.RemoveEmptyEntries).Distinct().Intersect( strB.ToLower.Split(" "c,StringSplitOptions.RemoveEmptyEntries).Distinct).OrderBy(Function(s) s).SequenceEqual(strB.ToLower.Split(" "c,StringSplitOptions.RemoveEmptyEntries).Distinct.OrderBy(Function(s) s))
Sample
Sample20240307-1.zip (2.8 KB)
IT IS NOT WORKING!
Global_Name_dict(CurrentRow(“EMP ID”).ToString.Trim)=“Manoj Kumar bodke”
and
CurrentRow(“Employee Name”).ToString.Trim=“Bodke Manoj Kumar”
The reason for comparing this EMP ID is some error accounts are having same EMP ID but different Name
Sorry but the following is simpler
strB.ToLower.Split(" "c,StringSplitOptions.RemoveEmptyEntries).All(Function(s) strA.ToLower.Split(" "c,StringSplitOptions.RemoveEmptyEntries).Contains(s))
Sample
Sample20240307-1 (2).zip (2.8 KB)
Regards,
1 Like
Thank you Yoichi! for the solution
1 Like
Hi,
As latter sample is simpler, can you also try it?
Regards,
1 Like
Sure! thanks for optimization
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.

