Link to home
Start Free TrialLog in
Avatar of Flora Edwards
Flora EdwardsFlag for Sweden

asked on

VBA modification from earlier solution by Fabrice Lambert to make this comparison work

I had this question after viewing Challenge for  VBA Experts to compare the two strings, original and revised and return the differences.

Fabrice Lambert was so kind helping me with the code that almost works but leaves out some of the words.

I have attached the workbook that illustrates the problem, i am hoping that VBA experts could help me solve this problem.

Thank you.

User generated imageBook1.xlsb
Avatar of aikimark
aikimark
Flag of United States of America image

1. The solution you accepted did a word difference comparison.  That is very different from the phrase (substring) difference you seek.

2. The example you posted in your original question does allow "DOD" to be the correct value in column C4.

Maybe it is a good time for you to define your problem more accurately.
What do you want to do about punctuation and capitalization?
ASKER CERTIFIED SOLUTION
Avatar of Ejgil Hedegaard
Ejgil Hedegaard
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Flora Edwards

ASKER

Ejgil Hedegaard

Thanks a Million!  I was becoming hopeless fearing that it might not be possible to achieve what I was looking for.  you are very kind, you just made my day. it worked perfectly in all scenarios of my data
thank you aikimark
Did you test this thoroughly?
Yes, aikimark.
i tested it thoroughly. so far, i have not found any problem. it does the job.

thanks.
Any three-word (or more) phrase differences in your tests?
yes.