ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do I match using partial or approximate values? (https://www.excelbanter.com/excel-worksheet-functions/201520-how-do-i-match-using-partial-approximate-values.html)

gear350z

How do I match using partial or approximate values?
 
I want to compare/match data from two 1,000+ row spreadsheets where the
values are similar but not exactly alike. For example, on one spreadsheet I
have a name like John P. Smith Associates, and on the other spreadsheet I
have John Smith Assoc. I would like to find and return a match using a
partial value, such as "Smith Assoc" ...sort of using a wildcard containig
the value. I've tried using vlookup for exact and approx matches but it did
not work out for me.

T. Valko

How do I match using partial or approximate values?
 
What kind of result are you looking for?

=COUNTIF(Sheet2!A1:A1000,"*Smith Assoc*")

Or, using a cell reference:

A1 = Smith Assoc

=COUNTIF(Sheet2!A1:A1000,"*"&A1&"*")

--
Biff
Microsoft Excel MVP


"gear350z" wrote in message
...
I want to compare/match data from two 1,000+ row spreadsheets where the
values are similar but not exactly alike. For example, on one spreadsheet
I
have a name like John P. Smith Associates, and on the other spreadsheet I
have John Smith Assoc. I would like to find and return a match using a
partial value, such as "Smith Assoc" ...sort of using a wildcard
containig
the value. I've tried using vlookup for exact and approx matches but it
did
not work out for me.




Spiky

How do I match using partial or approximate values?
 
Or some others....

Note this is an exact reference, use FALSE. This will return the value
(text) in the first cell it finds with "smith":
=VLOOKUP("*smith*",A1:A100,1,FALSE)

Try MATCH instead if you are looking for a reference. This will return
the row number of that cell:
=MATCH("*smith*",A1:A100,0)

Teethless mama

How do I match using partial or approximate values?
 
=VLOOKUP("*Smith Assoc*",A:B,2,0)


"gear350z" wrote:

I want to compare/match data from two 1,000+ row spreadsheets where the
values are similar but not exactly alike. For example, on one spreadsheet I
have a name like John P. Smith Associates, and on the other spreadsheet I
have John Smith Assoc. I would like to find and return a match using a
partial value, such as "Smith Assoc" ...sort of using a wildcard containig
the value. I've tried using vlookup for exact and approx matches but it did
not work out for me.



All times are GMT +1. The time now is 12:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com