Good evening.
if I have a list of urls in an excel column, is it possible to extract the phone numbers present in each and insert them in the adjacent column?
I saw this post:
https://chandoo.org/forum/threads/unabl ... ost-218525
Thanks
extract phone numbers from a url lis
-
- NewLounger
- Posts: 4
- Joined: 23 Jul 2020, 15:53
-
- Administrator
- Posts: 78608
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: extract phone numbers from a url lis
Welcome to Eileen's Lounge!
Could you provide a small sample workbook without sensitive/proprietary information? You can attach workbooks up to 250 KB to a reply.
Could you provide a small sample workbook without sensitive/proprietary information? You can attach workbooks up to 250 KB to a reply.
Best wishes,
Hans
Hans
-
- NewLounger
- Posts: 4
- Joined: 23 Jul 2020, 15:53
Re: extract phone numbers from a url lis
Thank you for your answer.
I created a file where in the sheet 1, column A there are the urls while in the adjacent cells there are the telephone numbers that I found in each site. In sheet 2 instead I entered all the telephone prefixes used in Italy (both fixed and mobile - last column) for a possible check or to divide the fixed numbers from the mobile numbers in the columns.
It is possible that a url has multiple phone numbers.
Also I found links where there are regex strings to use:
https://stackoverflow.com/questions/357 ... egex-issue
https://www.etl-tools.com/regular-expre ... umber.html
https://regexlib.com/Search.aspx?k=Mobi ... eSupport=1
I created a file where in the sheet 1, column A there are the urls while in the adjacent cells there are the telephone numbers that I found in each site. In sheet 2 instead I entered all the telephone prefixes used in Italy (both fixed and mobile - last column) for a possible check or to divide the fixed numbers from the mobile numbers in the columns.
It is possible that a url has multiple phone numbers.
Also I found links where there are regex strings to use:
https://stackoverflow.com/questions/357 ... egex-issue
https://www.etl-tools.com/regular-expre ... umber.html
https://regexlib.com/Search.aspx?k=Mobi ... eSupport=1
You do not have the required permissions to view the files attached to this post.
-
- Administrator
- Posts: 78608
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: extract phone numbers from a url lis
Thank you. It's not clear to me yet what you would like the end result to be. Could you provide an example?
Best wishes,
Hans
Hans
-
- NewLounger
- Posts: 4
- Joined: 23 Jul 2020, 15:53
Re: extract phone numbers from a url lis
You just need to see sheet 1 of the file that I have attached.
I would like to insert a list of urls in column a.
The macro will have to extract the contact telephone numbers of the website for each url.
I would like to insert a list of urls in column a.
The macro will have to extract the contact telephone numbers of the website for each url.
-
- Administrator
- Posts: 78608
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: extract phone numbers from a url lis
I don't see a phone number on the site listed in cell A2.
Apart from that, I tried all the regular expression patterns in the links that you provided, but none of them find a telephone number on any of the sites.
I don't know enough about reading web pages to be of further assistance, sorry. Perhaps someone else can help you.
Apart from that, I tried all the regular expression patterns in the links that you provided, but none of them find a telephone number on any of the sites.
I don't know enough about reading web pages to be of further assistance, sorry. Perhaps someone else can help you.
Best wishes,
Hans
Hans
-
- NewLounger
- Posts: 4
- Joined: 23 Jul 2020, 15:53
Re: extract phone numbers from a url lis
In column "A" I entered the urls while in the others beside the numbers that I found in the contact section of the web pages.
the links of the regx expressions should be inserted in the macro code to identify the composition of the number to be found and extracted
the links of the regx expressions should be inserted in the macro code to identify the composition of the number to be found and extracted
-
- Administrator
- Posts: 78608
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: extract phone numbers from a url lis
Yes, I understand. I tried several of the RegEx expressions, but none of them found a phone number on any of the URLs in column A.
Best wishes,
Hans
Hans