C
c mateland
Excel 2003
[lookup value = string I'm searching for]
[reference table = list I'm searching in]
I'm looping through a list of lookup values and matching them to
entries in a reference table. All I want is a true/false if the lookup
value exists in the reference table.
When performing a vlookup or match in vba, Excel sees the lookup value
as text data type but sees the reference table as a number data type,
and therefore doesn't make the match. It only has this issue when the
lookup value contains no alpha-charaters. For example, the lookup
value is 52123 and in the reference table is 52123, yet I can't get
Excel to make the match. But if the lookup value contains alpha-
characters, such as X52123, then it matches fine to X52123 in the
reference table.
) The lookup values were exported into Excel via some database
program, and the reference table was exported into Excel from some
other database program.
) All cells are formatted as text.
) I gave up on CountIf also because it couldn't tell the difference
between 052123 and 52123.
Any ideas on how I can get this right?
[lookup value = string I'm searching for]
[reference table = list I'm searching in]
I'm looping through a list of lookup values and matching them to
entries in a reference table. All I want is a true/false if the lookup
value exists in the reference table.
When performing a vlookup or match in vba, Excel sees the lookup value
as text data type but sees the reference table as a number data type,
and therefore doesn't make the match. It only has this issue when the
lookup value contains no alpha-charaters. For example, the lookup
value is 52123 and in the reference table is 52123, yet I can't get
Excel to make the match. But if the lookup value contains alpha-
characters, such as X52123, then it matches fine to X52123 in the
reference table.
) The lookup values were exported into Excel via some database
program, and the reference table was exported into Excel from some
other database program.
) All cells are formatted as text.
) I gave up on CountIf also because it couldn't tell the difference
between 052123 and 52123.
Any ideas on how I can get this right?