String Search
On May 21, 8:02*am, LaRana6261
wrote:
Thanks, but table 1 will be different each time as I review different data
files. The macro will have to be flexible enough to pick the first 4 to 5
letter in description and search in table 2. Then, return the code in table 2.
--
EdV
"PY & Associates" wrote:
On May 21, 6:25 am, LaRana6261
wrote:
Hello,
I have two tables where I want find the best match according to the
description on both tables. The result will be the corresponding code in the
second table.
Example:
first table
code * * * * *description
101 * * * * * *agri
102 * * * * * *single family
103 * * * * * *mobile home
104 * * * * * *vacant land
105 * * * * * *recr
Second table
Code * * *Description
1000 * * *Agricultural
1002 * * Single Family Residence
1003 * * Recreational
1004 * * Vacant
When both tables are matched, the macro should look for the best fit in
table 2 and returns the code. The 'Best fit' will depend on words that match
(maybe the first 4 to 5 letters) and a count of words. The match with the
highest count will define which code should be pulled....
Greatly appreciated!
--
EdV
Like "agri*"
.- Hide quoted text -
- Show quoted text -
Perhaps
n=inputbox("Number of characters to match")
strLike=left(cell, n) & "*"
like strLike
|