rahmanafzal
New Member
- Joined
- Jun 21, 2018
- Messages
- 1
Needs help in order to match longest prefix, As an example
I have an excel which contains prefix list like below; Column A contains regions and Column B contains prefix.
Destination Prefix
Afghanistan 93
Afghanistan - Mobile - Afghan Telecom 9375
Afghanistan - Mobile - Awcc 9370
Afghanistan - Mobile - Awcc 9371
Afghanistan - Mobile - Etisalat 9378
Afghanistan - Mobile - Mtn 9376
Afghanistan - Mobile - Mtn 93765
Afghanistan - Mobile - Mtn 93766
Afghanistan - Mobile - Mtn 93767
Afghanistan - Mobile - Mtn 9377
Afghanistan - Mobile - Roshan 9372
Afghanistan - Mobile - Roshan 93744
Afghanistan - Mobile - Roshan 93747
Afghanistan - Mobile - Roshan 9379
Afghanistan - Mobile - Salaam 9374
and Column D contains dialed numbers list, Now what i need is to match the dialed number which is in column D with longest prefix match with column B and return the value of Column A against the match and put in Column E as shown below.
like 93774841931 is longest prefix match 9377 which returns the value "Afghanistan - Mobile - Mtn" in column E.
Dialed Number Region
93774841931 Afghanistan - Mobile - Mtn
93705713317 Afghanistan - Mobile - Awcc
93705713317 Afghanistan - Mobile - Awcc
93787469021 Afghanistan - Mobile - Etisalat
93778513480 Afghanistan - Mobile - Mtn
93778513480 Afghanistan - Mobile - Mtn
93778513480 Afghanistan - Mobile - Mtn
93767195343 Afghanistan - Mobile - Mtn
Regards,
Rahman
I have an excel which contains prefix list like below; Column A contains regions and Column B contains prefix.
Destination Prefix
Afghanistan 93
Afghanistan - Mobile - Afghan Telecom 9375
Afghanistan - Mobile - Awcc 9370
Afghanistan - Mobile - Awcc 9371
Afghanistan - Mobile - Etisalat 9378
Afghanistan - Mobile - Mtn 9376
Afghanistan - Mobile - Mtn 93765
Afghanistan - Mobile - Mtn 93766
Afghanistan - Mobile - Mtn 93767
Afghanistan - Mobile - Mtn 9377
Afghanistan - Mobile - Roshan 9372
Afghanistan - Mobile - Roshan 93744
Afghanistan - Mobile - Roshan 93747
Afghanistan - Mobile - Roshan 9379
Afghanistan - Mobile - Salaam 9374
and Column D contains dialed numbers list, Now what i need is to match the dialed number which is in column D with longest prefix match with column B and return the value of Column A against the match and put in Column E as shown below.
like 93774841931 is longest prefix match 9377 which returns the value "Afghanistan - Mobile - Mtn" in column E.
Dialed Number Region
93774841931 Afghanistan - Mobile - Mtn
93705713317 Afghanistan - Mobile - Awcc
93705713317 Afghanistan - Mobile - Awcc
93787469021 Afghanistan - Mobile - Etisalat
93778513480 Afghanistan - Mobile - Mtn
93778513480 Afghanistan - Mobile - Mtn
93778513480 Afghanistan - Mobile - Mtn
93767195343 Afghanistan - Mobile - Mtn
Regards,
Rahman
Last edited by a moderator: