Matching phone numbers formula

Tripleseas

Board Regular
Joined
Jul 12, 2022
Messages
87
Office Version
  1. 2013
Platform
  1. Windows
Hello community,
I have one data set that contains different phone numbers as shown below. ( Phones dataset column ). I added a digit number and as you can see the majority of these phone's numbers are 11 digits. these info are pulled from an ERP.

the second data set is the matching process. ( Phone 2 column is typed manually by different people ). my goal is to match whether these phone numbers exist in the first data set ( phones dataset column). so i added a vlookup and its working. the phones numbers that do not exist in the first dataset are shown. but the manually typed phone numbers are not in the same format as the numbers pulled from the ERP. So i want to know what is the best solution to go about this ? as this is a task that will be repeated many times and I need to figure out a way to automate this the best safe way so i can avoid errors.

i'm afraid that some phone numbers that are typed manually might exist on the data set but it's just the format that's not matching and my vlookup formula cant detect it. if you can understand me.

thank you guys for the much-needed help.




Matching.xlsx
ABCDEF
2The look up table The matching process
3Phones datasetdigit numberPhones 2Matching resultdigit number
43369850072211346420803493464208034911
53375371877311337644804843376448048411
63460026217511336514778363365147783611
73365116545111346436504873464365048711
83363526050311337815025803378150258011
93464170433111393492960583934929605811
10337739502021134635273041not found9
11336427077691134617000986not found9
12336394299891134617009408not found9
13335698529851134657382545not found9
143364469156511336738938193367389381911
15337760660231134600297866not found9
16337731428131132486040820not found9
173363296508811602097390not found9
183374990903511722317741not found9
194366618597311632287993not found9
203362997676311628468524not found9
213464208034911671306030not found9
223472231774111667894092not found9
233362825035611766682220not found9
243460209739011631458918not found9
253463161682011663486304not found9
2639320966160812603523690not found9
273463228799311666125064not found9
283462849852411769284167not found9
293248749400411493306400not found9
303376448048411485924451not found9
31346713060301133634567654not found9
323375894446711631507942not found9
333246569614311324874940043248749400411
343464135688711641356887not found9
3533651477836113934826512643.93483E+1112
3639348265126412330626639509not found9
373466789409211661186664not found9
383171134481111632298592not found9
393374839159511602328304not found9
403362158956711212670837277not found9
4139320966252412722422864not found9
423362663950911631567158not found9
433376968818511330744535040not found9
443464365048711346020035003460200350011
45346314589181133618828223not found9
463378150258011346313579263463135792611
473388744222511346316898243463168982411
48336859858551124631066240not found9
493460352369011612475930not found9
503463229859211324651165083246511650811
51336144171831133763311748not found9
52346332166721131629514030not found9
533460232830411346313581883463135818811
543376928416711324891177383248911773811
553367083727711632646811not found9
563364982886111642549857not found9
573934929605811641452785not found9
583367591667711330616220345not found9
593466669186211631492427not found9
603466112210411631009472not found9
613472242286411600810420not found9
623463156715811641593115not found9
633362184452311324869440863248694408611
643365230100611212655088941not found9
653368746543011324862085763248620857611
663463428673311622294409not found9
673463417740611602136024not found9
683463267242011664046031not found9
693366838450411491788232630not found9
703468820118811393246188862not found9
713364176040311395557234588not found9
723460200350011632952987not found9
7334631911134113369713301not found9
743363443415511330625230548not found9
7534676096453113307580527not found9
763360392665411693378822not found9
773360530648811337662024673376620246711
78491578831533813631177138not found9
793463214637711645096065not found9
803377739337011602192976not found9
813363974958611324677478773246774787711
823360582542011346325066013463250660111
833248446984511324893037413248930374111
84316384331661134697815913not found9
853463135792611324920706003249207060011
863463261423011346669258943466692589411
8734632249923113466291856not found9
883464089544611324848791053248487910511
893461254378811336080310243360803102411
903249420687511336011101973360111019711
913362801449011346125124233461251242311
923467489718411336501689743365016897411
93336171524171133654841200not found9
Feuil2
Cell Formulas
RangeFormula
E4:E93E4=IFERROR(VLOOKUP(D4,$A$4:$A$539,1,0),"not found")
B4:B93,F4:F93F4=LEN(E4)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
D3:D242,D267:D1048576Cell ValueduplicatestextNO
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Quita los espacios, y seguramente los tienes en formato de texto. Convierte todo a numero.
 
Upvote 0
Hi, Welcome to MrExcel.

May be someone will come up with a good solution

Use Ctrl + Shift + Enter to enter array formula

Try

Book13.xlsx
ABCDEFG
1
2The look up table The matching process
3Phones datasetdigit numberPhones 2Matching resultdigit number
43369850072211346420803493464208034911
53375371877311337644804843376448048411
63460026217511336514778363365147783611
73365116545111346436504873464365048711
83363526050311337815025803378150258011
93464170433111393492960583934929605811
10337739502021134635273041not found9
11336427077691134617000986not found9
12336394299891134617009408not found9
13335698529851134657382545not found9
14336446915651133673893819not found9
15337760660231134600297866not found9
16337731428131132486040820not found9
1733632965088116020973906020973909
1833749909035117223177417223177419
1943666185973116322879936322879939
203362997676311628468524not Found9
2134642080349116713060306713060309
2234722317741116678940926678940929
233362825035611766682220not Found9
2434602097390116314589186314589189
253463161682011663486304not Found9
263.9321E+11126035236906035236909
273463228799311666125064not Found9
2834628498524117692841677692841679
293248749400411493306400not Found9
303376448048411485924451not Found9
31346713060301133634567654not found9
323375894446711631507942not Found9
333246569614311324874940043248749400411
3434641356887116413568876413568879
3533651477836113.93483E+113.93483E+1112
363.93483E+11123.30627E+11not found9
373466789409211661186664not Found9
3831711344811116322985926322985929
3933748391595116023283046023283049
4033621589567112.12671E+11not found9
413.9321E+11127224228647224228649
4233626639509116315671586315671589
4333769688185113.30745E+11not found9
443464365048711346020035003460200350011
45346314589181133618828223not found9
463378150258011346313579263463135792611
47338874422251134631689824not found9
48336859858551124631066240not found9
493460352369011612475930not Found9
50346322985921132465116508not found9
51336144171831133763311748not found9
52346332166721131629514030not found9
53346023283041134631358188not found9
54337692841671132489117738not found9
553367083727711632646811not Found9
563364982886111642549857not Found9
573934929605811641452785not Found9
5833675916677113.30616E+11not found9
593466669186211631492427not Found9
603466112210411631009472not Found9
613472242286411600810420not Found9
623463156715811641593115not Found9
63336218445231132486944086not found9
6433652301006112.12655E+11not found9
65336874654301132486208576not found9
663463428673311622294409not Found9
673463417740611602136024not Found9
683463267242011664046031not Found9
6933668384504114.91788E+11not found9
7034688201188113.93246E+11not found9
7133641760403113.95557E+11not found9
723460200350011632952987not Found9
7334631911134113369713301not Found9
7433634434155113.30625E+11not found9
7534676096453113307580527not Found9
763360392665411693378822not Found9
77336053064881133766202467not found9
784.91579E+1213631177138not Found9
793463214637711645096065not Found9
803377739337011602192976not Found9
81336397495861132467747877not found9
82336058254201134632506601not found9
83324844698451132489303741not found9
84316384331661134697815913not found9
85346313579261132492070600not found9
86346326142301134666925894not found9
8734632249923113466291856not Found9
88346408954461132484879105not found9
89346125437881133608031024not found9
90324942068751133601110197not found9
91336280144901134612512423not found9
92346748971841133650168974not found9
93336171524171133654841200not found9
94
Sheet1
Cell Formulas
RangeFormula
E4:E93E4=IF(LEN(D4)<11,IFERROR(VLOOKUP("*"&D4,RIGHT($A$4:$B$93,LEN(D4)),1,0),"not Found"),IFERROR(VLOOKUP(D4,$A$4:$A$539,1,0),"not found"))
F4:F93,B4:B93F4=LEN(E4)
 
Upvote 0
Hi, Welcome to MrExcel.

May be someone will come up with a good solution

Use Ctrl + Shift + Enter to enter array formula

Try

Book13.xlsx
ABCDEFG
1
2The look up table The matching process
3Phones datasetdigit numberPhones 2Matching resultdigit number
43369850072211346420803493464208034911
53375371877311337644804843376448048411
63460026217511336514778363365147783611
73365116545111346436504873464365048711
83363526050311337815025803378150258011
93464170433111393492960583934929605811
10337739502021134635273041not found9
11336427077691134617000986not found9
12336394299891134617009408not found9
13335698529851134657382545not found9
14336446915651133673893819not found9
15337760660231134600297866not found9
16337731428131132486040820not found9
1733632965088116020973906020973909
1833749909035117223177417223177419
1943666185973116322879936322879939
203362997676311628468524not Found9
2134642080349116713060306713060309
2234722317741116678940926678940929
233362825035611766682220not Found9
2434602097390116314589186314589189
253463161682011663486304not Found9
263.9321E+11126035236906035236909
273463228799311666125064not Found9
2834628498524117692841677692841679
293248749400411493306400not Found9
303376448048411485924451not Found9
31346713060301133634567654not found9
323375894446711631507942not Found9
333246569614311324874940043248749400411
3434641356887116413568876413568879
3533651477836113.93483E+113.93483E+1112
363.93483E+11123.30627E+11not found9
373466789409211661186664not Found9
3831711344811116322985926322985929
3933748391595116023283046023283049
4033621589567112.12671E+11not found9
413.9321E+11127224228647224228649
4233626639509116315671586315671589
4333769688185113.30745E+11not found9
443464365048711346020035003460200350011
45346314589181133618828223not found9
463378150258011346313579263463135792611
47338874422251134631689824not found9
48336859858551124631066240not found9
493460352369011612475930not Found9
50346322985921132465116508not found9
51336144171831133763311748not found9
52346332166721131629514030not found9
53346023283041134631358188not found9
54337692841671132489117738not found9
553367083727711632646811not Found9
563364982886111642549857not Found9
573934929605811641452785not Found9
5833675916677113.30616E+11not found9
593466669186211631492427not Found9
603466112210411631009472not Found9
613472242286411600810420not Found9
623463156715811641593115not Found9
63336218445231132486944086not found9
6433652301006112.12655E+11not found9
65336874654301132486208576not found9
663463428673311622294409not Found9
673463417740611602136024not Found9
683463267242011664046031not Found9
6933668384504114.91788E+11not found9
7034688201188113.93246E+11not found9
7133641760403113.95557E+11not found9
723460200350011632952987not Found9
7334631911134113369713301not Found9
7433634434155113.30625E+11not found9
7534676096453113307580527not Found9
763360392665411693378822not Found9
77336053064881133766202467not found9
784.91579E+1213631177138not Found9
793463214637711645096065not Found9
803377739337011602192976not Found9
81336397495861132467747877not found9
82336058254201134632506601not found9
83324844698451132489303741not found9
84316384331661134697815913not found9
85346313579261132492070600not found9
86346326142301134666925894not found9
8734632249923113466291856not Found9
88346408954461132484879105not found9
89346125437881133608031024not found9
90324942068751133601110197not found9
91336280144901134612512423not found9
92346748971841133650168974not found9
93336171524171133654841200not found9
94
Sheet1
Cell Formulas
RangeFormula
E4:E93E4=IF(LEN(D4)<11,IFERROR(VLOOKUP("*"&D4,RIGHT($A$4:$B$93,LEN(D4)),1,0),"not Found"),IFERROR(VLOOKUP(D4,$A$4:$A$539,1,0),"not found"))
F4:F93,B4:B93F4=LEN(E4)
Thank you sir for this formula. i will try it. can you just please elaborate on what the formula do exactly because we had the same results. and also, should i change the manually typed phones numbers to another format or just keep them like that thank you sir
 
Upvote 0
because we had the same results.

Actually both does not give same results, see below

Book17
ABCDEFGHIJ
1
2The look up table The matching processThe matching process
3Phones datasetdigit numberPhones 2Matching resultdigit numberPhones 2Matching resultdigit number
43369850072211346420803493464208034911346420803493464208034911
53375371877311337644804843376448048411337644804843376448048411
63460026217511336514778363365147783611336514778363365147783611
73365116545111346436504873464365048711346436504873464365048711
83363526050311337815025803378150258011337815025803378150258011
93464170433111393492960583934929605811393492960583934929605811
10337739502021134635273041not found934635273041not found9
11336427077691134617000986not found934617000986not found9
12336394299891134617009408not found934617009408not found9
13335698529851134657382545not found934657382545not found9
14336446915651133673893819not found933673893819not found9
15337760660231134600297866not found934600297866not found9
16337731428131132486040820not found932486040820not found9
173363296508811602097390not found96020973906020973909
183374990903511722317741not found97223177417223177419
194366618597311632287993not found96322879936322879939
203362997676311628468524not found9628468524not Found9
213464208034911671306030not found96713060306713060309
223472231774111667894092not found96678940926678940929
233362825035611766682220not found9766682220not Found9
243460209739011631458918not found96314589186314589189
253463161682011663486304not found9663486304not Found9
263.9321E+1112603523690not found96035236906035236909
273463228799311666125064not found9666125064not Found9
283462849852411769284167not found97692841677692841679
293248749400411493306400not found9493306400not Found9
303376448048411485924451not found9485924451not Found9
31346713060301133634567654not found933634567654not found9
323375894446711631507942not found9631507942not Found9
333246569614311324874940043248749400411324874940043248749400411
343464135688711641356887not found96413568876413568879
3533651477836113.93483E+113.93483E+11123.93483E+113.93483E+1112
363.93483E+11123.30627E+11not found93.30627E+11not found9
373466789409211661186664not found9661186664not Found9
383171134481111632298592not found96322985926322985929
393374839159511602328304not found96023283046023283049
4033621589567112.12671E+11not found92.12671E+11not found9
413.9321E+1112722422864not found97224228647224228649
423362663950911631567158not found96315671586315671589
4333769688185113.30745E+11not found93.30745E+11not found9
443464365048711346020035003460200350011346020035003460200350011
45346314589181133618828223not found933618828223not found9
463378150258011346313579263463135792611346313579263463135792611
47338874422251134631689824not found934631689824not found9
48336859858551124631066240not found924631066240not found9
493460352369011612475930not found9612475930not Found9
50346322985921132465116508not found932465116508not found9
51336144171831133763311748not found933763311748not found9
52346332166721131629514030not found931629514030not found9
53346023283041134631358188not found934631358188not found9
54337692841671132489117738not found932489117738not found9
553367083727711632646811not found9632646811not Found9
563364982886111642549857not found9642549857not Found9
573934929605811641452785not found9641452785not Found9
5833675916677113.30616E+11not found93.30616E+11not found9
593466669186211631492427not found9631492427not Found9
603466112210411631009472not found9631009472not Found9
613472242286411600810420not found9600810420not Found9
623463156715811641593115not found9641593115not Found9
63336218445231132486944086not found932486944086not found9
6433652301006112.12655E+11not found92.12655E+11not found9
65336874654301132486208576not found932486208576not found9
663463428673311622294409not found9622294409not Found9
673463417740611602136024not found9602136024not Found9
683463267242011664046031not found9664046031not Found9
6933668384504114.91788E+11not found94.91788E+11not found9
7034688201188113.93246E+11not found93.93246E+11not found9
7133641760403113.95557E+11not found93.95557E+11not found9
723460200350011632952987not found9632952987not Found9
7334631911134113369713301not found93369713301not Found9
7433634434155113.30625E+11not found93.30625E+11not found9
7534676096453113307580527not found93307580527not Found9
763360392665411693378822not found9693378822not Found9
77336053064881133766202467not found933766202467not found9
784.91579E+1213631177138not found9631177138not Found9
793463214637711645096065not found9645096065not Found9
803377739337011602192976not found9602192976not Found9
81336397495861132467747877not found932467747877not found9
82336058254201134632506601not found934632506601not found9
83324844698451132489303741not found932489303741not found9
84316384331661134697815913not found934697815913not found9
85346313579261132492070600not found932492070600not found9
86346326142301134666925894not found934666925894not found9
8734632249923113466291856not found93466291856not Found9
88346408954461132484879105not found932484879105not found9
89346125437881133608031024not found933608031024not found9
90324942068751133601110197not found933601110197not found9
91336280144901134612512423not found934612512423not found9
92346748971841133650168974not found933650168974not found9
93336171524171133654841200not found933654841200not found9
Sheet1
Cell Formulas
RangeFormula
E4:E93E4=IFERROR(VLOOKUP(D4,$A$4:$A$539,1,0),"not found")
F4:F93,B4:B93F4=LEN(E4)
I4:I93I4=IF(LEN(D4)<11,IFERROR(VLOOKUP("*"&D4,RIGHT($A$4:$B$93,LEN(D4)),1,0),"not Found"),IFERROR(VLOOKUP(D4,$A$4:$A$539,1,0),"not found"))
J4:J93J4=LEN(E4)
 
Upvote 0
Actually both does not give same results, see below

Book17
ABCDEFGHIJ
1
2The look up table The matching processThe matching process
3Phones datasetdigit numberPhones 2Matching resultdigit numberPhones 2Matching resultdigit number
43369850072211346420803493464208034911346420803493464208034911
53375371877311337644804843376448048411337644804843376448048411
63460026217511336514778363365147783611336514778363365147783611
73365116545111346436504873464365048711346436504873464365048711
83363526050311337815025803378150258011337815025803378150258011
93464170433111393492960583934929605811393492960583934929605811
10337739502021134635273041not found934635273041not found9
11336427077691134617000986not found934617000986not found9
12336394299891134617009408not found934617009408not found9
13335698529851134657382545not found934657382545not found9
14336446915651133673893819not found933673893819not found9
15337760660231134600297866not found934600297866not found9
16337731428131132486040820not found932486040820not found9
173363296508811602097390not found96020973906020973909
183374990903511722317741not found97223177417223177419
194366618597311632287993not found96322879936322879939
203362997676311628468524not found9628468524not Found9
213464208034911671306030not found96713060306713060309
223472231774111667894092not found96678940926678940929
233362825035611766682220not found9766682220not Found9
243460209739011631458918not found96314589186314589189
253463161682011663486304not found9663486304not Found9
263.9321E+1112603523690not found96035236906035236909
273463228799311666125064not found9666125064not Found9
283462849852411769284167not found97692841677692841679
293248749400411493306400not found9493306400not Found9
303376448048411485924451not found9485924451not Found9
31346713060301133634567654not found933634567654not found9
323375894446711631507942not found9631507942not Found9
333246569614311324874940043248749400411324874940043248749400411
343464135688711641356887not found96413568876413568879
3533651477836113.93483E+113.93483E+11123.93483E+113.93483E+1112
363.93483E+11123.30627E+11not found93.30627E+11not found9
373466789409211661186664not found9661186664not Found9
383171134481111632298592not found96322985926322985929
393374839159511602328304not found96023283046023283049
4033621589567112.12671E+11not found92.12671E+11not found9
413.9321E+1112722422864not found97224228647224228649
423362663950911631567158not found96315671586315671589
4333769688185113.30745E+11not found93.30745E+11not found9
443464365048711346020035003460200350011346020035003460200350011
45346314589181133618828223not found933618828223not found9
463378150258011346313579263463135792611346313579263463135792611
47338874422251134631689824not found934631689824not found9
48336859858551124631066240not found924631066240not found9
493460352369011612475930not found9612475930not Found9
50346322985921132465116508not found932465116508not found9
51336144171831133763311748not found933763311748not found9
52346332166721131629514030not found931629514030not found9
53346023283041134631358188not found934631358188not found9
54337692841671132489117738not found932489117738not found9
553367083727711632646811not found9632646811not Found9
563364982886111642549857not found9642549857not Found9
573934929605811641452785not found9641452785not Found9
5833675916677113.30616E+11not found93.30616E+11not found9
593466669186211631492427not found9631492427not Found9
603466112210411631009472not found9631009472not Found9
613472242286411600810420not found9600810420not Found9
623463156715811641593115not found9641593115not Found9
63336218445231132486944086not found932486944086not found9
6433652301006112.12655E+11not found92.12655E+11not found9
65336874654301132486208576not found932486208576not found9
663463428673311622294409not found9622294409not Found9
673463417740611602136024not found9602136024not Found9
683463267242011664046031not found9664046031not Found9
6933668384504114.91788E+11not found94.91788E+11not found9
7034688201188113.93246E+11not found93.93246E+11not found9
7133641760403113.95557E+11not found93.95557E+11not found9
723460200350011632952987not found9632952987not Found9
7334631911134113369713301not found93369713301not Found9
7433634434155113.30625E+11not found93.30625E+11not found9
7534676096453113307580527not found93307580527not Found9
763360392665411693378822not found9693378822not Found9
77336053064881133766202467not found933766202467not found9
784.91579E+1213631177138not found9631177138not Found9
793463214637711645096065not found9645096065not Found9
803377739337011602192976not found9602192976not Found9
81336397495861132467747877not found932467747877not found9
82336058254201134632506601not found934632506601not found9
83324844698451132489303741not found932489303741not found9
84316384331661134697815913not found934697815913not found9
85346313579261132492070600not found932492070600not found9
86346326142301134666925894not found934666925894not found9
8734632249923113466291856not found93466291856not Found9
88346408954461132484879105not found932484879105not found9
89346125437881133608031024not found933608031024not found9
90324942068751133601110197not found933601110197not found9
91336280144901134612512423not found934612512423not found9
92346748971841133650168974not found933650168974not found9
93336171524171133654841200not found933654841200not found9
Sheet1
Cell Formulas
RangeFormula
E4:E93E4=IFERROR(VLOOKUP(D4,$A$4:$A$539,1,0),"not found")
F4:F93,B4:B93F4=LEN(E4)
I4:I93I4=IF(LEN(D4)<11,IFERROR(VLOOKUP("*"&D4,RIGHT($A$4:$B$93,LEN(D4)),1,0),"not Found"),IFERROR(VLOOKUP(D4,$A$4:$A$539,1,0),"not found"))
J4:J93J4=LEN(E4)
thank you sir for your response. Indeed, the formula does not show the same results. I worked with your formula and i managed to get pretty solid results and for that i sinecerely thank you.
I want to discuss with you this case if possible :

Let's say the phones i have are 9 digits and the phones in the lookup table are more than 11 digits. example :
phone number : 123456789
phone in the lookup table : 333123456789

can the formula be adjusted to include this scenario also ? because i think the formula now incldue 9 digits vs 11 digits only.

beacause i will have these kind of scenario : 9 digits vs 12 digits or 9 digits vs 13 digits and so on. my point is i want the matching to match the maximum numbers included in both series ( phones in the lookup table and phones to match ) if you can undestand me.

sorry for being too long and thank you so much for your help.
 
Upvote 0
beacause i will have these kind of scenario : 9 digits vs 12 digits or 9 digits vs 13 digits and so on. my point is i want the matching to match the maximum numbers included in both series ( phones in the lookup table and phones to match ) if you can undestand me.

have you tried the formula above in that scenario? it should work.
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top