hi all.
can someone assist.
i have to compare two datasheets.
the first sheet contains a list of telephone numbers. these can range from 10 to 18 digits.
the second sheet contains a list of country prefixes. these can range from 1 to 6 digits.
i need to match the dialed numbers from sheet one the specified destination prefixes on sheet two.
the prefixes will always match the numbers from the left.
ie
dialed number can be 27212002040
prefix will be 272
once a prefix match has been found, the destination must be added to the dialed number sheet
the matching has to check for 1 digit prefixes, then 2 digit, then 3 digit, etc, and override the previous match if it exists.
we may have multiple prefixes for the same number, but with more digits
ie: 27212002040 will match prefix 27 as well as prefix 272. we desire the more detail (longer) prefix match
Sheet 1
A1 - Number Dialed
A2 -27212002040
A3 - 27726211098
A4 - 442078012300
A5 - 27105905577
Sheet 2
A1 - Prefix B1 - Destination
A2 - 27 B2 - South Africa
A3 - 272 B3 - South Africa WC
A4 - 277 B4 - South Africa Mobile
A5 - 44 B5 - UK General
this is what we hope to achive:
A1 - Number Dialed B1 - Destination
A2 -27212002040 B2 - South Africa WC
A3 - 27726211098 B3 - South Africa Mobile
A4 - 442078012300 B4 - UK General
A5 - 27105905577 B5 - South Africa
as you can see B2 & B3 matched on 3 digits, but would also have matched on 2 digits.
can someone please help with this.
i have to manually match this at the moment and the dailed umber data sheets are in excess of 400000 records. as you can imagine, it takes quite a while.
thanks
can someone assist.
i have to compare two datasheets.
the first sheet contains a list of telephone numbers. these can range from 10 to 18 digits.
the second sheet contains a list of country prefixes. these can range from 1 to 6 digits.
i need to match the dialed numbers from sheet one the specified destination prefixes on sheet two.
the prefixes will always match the numbers from the left.
ie
dialed number can be 27212002040
prefix will be 272
once a prefix match has been found, the destination must be added to the dialed number sheet
the matching has to check for 1 digit prefixes, then 2 digit, then 3 digit, etc, and override the previous match if it exists.
we may have multiple prefixes for the same number, but with more digits
ie: 27212002040 will match prefix 27 as well as prefix 272. we desire the more detail (longer) prefix match
Sheet 1
A1 - Number Dialed
A2 -27212002040
A3 - 27726211098
A4 - 442078012300
A5 - 27105905577
Sheet 2
A1 - Prefix B1 - Destination
A2 - 27 B2 - South Africa
A3 - 272 B3 - South Africa WC
A4 - 277 B4 - South Africa Mobile
A5 - 44 B5 - UK General
this is what we hope to achive:
A1 - Number Dialed B1 - Destination
A2 -27212002040 B2 - South Africa WC
A3 - 27726211098 B3 - South Africa Mobile
A4 - 442078012300 B4 - UK General
A5 - 27105905577 B5 - South Africa
as you can see B2 & B3 matched on 3 digits, but would also have matched on 2 digits.
can someone please help with this.
i have to manually match this at the moment and the dailed umber data sheets are in excess of 400000 records. as you can imagine, it takes quite a while.
thanks