Show percent match?

D

DevilDog1978

How can I get access to show percent match of a field in one table to a field
in another table? For example if I had an 8902A in the model number field of
a table and 8902AOPTE51 it would return a 45% match? Another example would be
an 34401AOPT010 and a 34401AOPTH31010 with a 80% match?
 
J

Jerry Whittle

Debug.Print CLng(Len("8902A") / len("8902AOPTE51") *100)
45


Matching: CLng(Len([Model Number Field]) / len([Model Number Field]) *100)

But that only works if the leading characters are the same. In your second
example, it might not be exactly correct.

Also as they are in different tables, you'll need something like a Primary
/Foreign Key relationship built upon other fields to join the tables.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top