Need code to search email id from website links through excel

%3CLINGO-SUB%20id%3D%22lingo-sub-1662928%22%20slang%3D%22en-US%22%3ENeed%20code%20to%20search%20email%20id%20from%20website%20links%20through%20excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1662928%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Experts%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20someone%20pls%26nbsp%3B%20help%20me%20and%20provide%20me%20Macro%20VBA%20code%20excel%20template%20wherein%20i%20have%20list%20of%20website%20addresses%20and%20need%20to%20search%20e-mail%20id%20from%20the%20entire%20website%20by%20running%20Macro%20VBA%20code%20and%20paste%20it%20in%20excel.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERegards%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENKD%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1662928%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExcel%20for%20web%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1663373%22%20slang%3D%22de-DE%22%3ESubject%3A%20Need%20code%20to%20search%20email%20id%20from%20website%20links%20through%20excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1663373%22%20slang%3D%22de-DE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F792363%22%20target%3D%22_blank%22%3E%40nkd8477%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CDIV%20class%3D%22text-wrap%20tlid-copy-target%22%3E%3CDIV%20class%3D%22result-shield-container%20tlid-copy-target%22%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22%22%3ETo%20create%20a%20VBA%20code%2C%20you%20should%20have%20more%20information%20on%20how%20to%20add%20internet%20addresses%20and%20lines%20%2F%20columns%20where%20it%20should%20be%20added.%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22%22%3EA%20lot%20of%20work%2C%20this%20is%20close%20to%20commissioned%20work%2C%20as%20it%20would%20have%20to%20be%20specially%20tailored%20so%20that%20it%20should%20work%20properly.%3C%2FSPAN%3E%20%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%20class%3D%22result-shield-container%20tlid-copy-target%22%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22%22%3ETry%20it%20in%20advance%20with%20this%20information%2C%20maybe%20you%20can%20solve%20your%20problem%20faster%20and%20better.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CH1%20id%3D%22toc-hId-529240180%22%20id%3D%22toc-hId-529240180%22%20id%3D%22toc-hId-529240180%22%20id%3D%22toc-hId-529240180%22%20id%3D%22toc-hId-529240180%22%20id%3D%22toc-hId-529240180%22%20id%3D%22toc-hId-529240180%22%20id%3D%22toc-hId-529240180%22%20id%3D%22toc-hId-529240180%22%20id%3D%22toc-hId-531109272%22%3E%3CFONT%20size%3D%222%22%3EImport%20data%20from%20external%20data%20sources%20(Power%20Query)%3C%2FFONT%3E%3C%2FH1%3E%3CP%3E%3CFONT%20size%3D%222%22%3E%3CA%20href%3D%22https%3A%2F%2Fsupport.microsoft.com%2Fen-gb%2Foffice%2Fimport-data-from-external-data-sources-power-query-be4330b3-5356-486c-a168-b68e9e616f5a%3Fui%3Den-us%26amp%3Brs%3Den-gb%26amp%3Bad%3Dgb%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsupport.microsoft.com%2Fen-gb%2Foffice%2Fimport-data-from-external-data-sources-power-query-be4330b3-5356-486c-a168-b68e9e616f5a%3Fui%3Den-us%26amp%3Brs%3Den-gb%26amp%3Bad%3Dgb%3C%2FA%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20would%20be%20happy%20to%20know%20if%20I%20could%20help.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENikolino%3C%2FP%3E%3CP%3EI%20know%20I%20don't%20know%20anything%20(Socrates)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%20size%3D%222%22%3E*%20Kindly%20Mark%20and%20Vote%20this%20reply%20if%20it%20helps%20please%2C%20as%20it%20will%20be%20beneficial%20to%20more%20community%20members%20reading%20here.%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1666983%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20code%20to%20search%20email%20id%20from%20website%20links%20through%20excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1666983%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F722750%22%20target%3D%22_blank%22%3E%40Nikolino%3C%2FA%3E%26nbsp%3B%20Hi%2C%20thanks%20for%20the%20info.%20i%20do%20not%20have%20any%20hands%20on%20and%20idea%20in%20programming.%20i%20want%20to%20extract%20e-mail%20id's%20in%20excel%20from%20the%20multiple%20websites%20on%20click%20of%20button%20through%20macro%20code..%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ei%20appreciate%20if%20you%20can%20help%20me%20in%20providing%20working%20excel%20with%20above%20requirements%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1669567%22%20slang%3D%22de-DE%22%3ERE%3A%20Need%20code%20to%20search%20email%20id%20from%20website%20links%20through%20excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1669567%22%20slang%3D%22de-DE%22%3EThe%20whole%20thing%20is%20not%20so%20easy%20to%20deal%20with.%20You%20would%20have%20to%20know%20the%20internet%20address%2C%20where%20it%20should%20be%20saved%2C%20in%20which%20columns%20%2F%20lines%2C%20etc.%2C%20this%20is%20commissioned%20work%20in%20my%20opinion%20and%20I%20don't%20have%20the%20time%20for%20that.%20But%20I'm%20out%20of%20the%20number%2C%20I%20can't%20help.%20Wish%20you%20success%20in%20your%20project%20with%20a%20lot%20of%20health%2C%20joy%20and%20love.%20Nikolino%20I%20know%20I%20don't%20know%20anything%20(Socrates)%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1681734%22%20slang%3D%22en-US%22%3ERE%3A%20Need%20code%20to%20search%20email%20id%20from%20website%20links%20through%20excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1681734%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F722750%22%20target%3D%22_blank%22%3E%40Nikolino%3C%2FA%3E%26nbsp%3BIn%20excel%20sheet%201%20column%20A%20will%20be%20website%20addresses%20and%20in%20column%20B%20will%20fetch%20e-mail%20id's%20of%20website%20addresses%20given%20A.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1683119%22%20slang%3D%22de-DE%22%3ERE%3A%20Need%20code%20to%20search%20email%20id%20from%20website%20links%20through%20excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1683119%22%20slang%3D%22de-DE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F792363%22%20target%3D%22_blank%22%3E%40nkd8477%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22%22%3EMaybe%20this%20will%20help%20you%20to%20create%20your%20own%20VBA%20code%20or%20everything%20as%20you%20wish.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSTRONG%3EHyperlinks%20via%20VBA%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%20With%20this%20macro%20all%20hyperlinks%20of%20a%20defined%20cell%20range%20can%20be%20read%20out.%20In%20this%20example%2C%20the%20macro%20scans%20column%20A%20and%20lists%20the%20results%2C%20i.e.%20all%20hyperlinks%20read%20in%20column%20B.%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3EPublic%20Sub%20Hyperlink_niko%20()%0A'Read%20out%20the%20hyperlink%20address%0ADim%20hlink%20As%20Hyperlink%0Ai%20%3D%201%0AFor%20Each%20hlink%20In%20Sheets%20(1)%20.Hyperlinks%0ASheets%20(1)%20.Cells%20(i%2C%202)%20.Value%20%3D%20hlink.Address%0Ai%20%3D%20i%20%2B%201%0ANext%20hlink%0AEnd%20Sub%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CBR%20%2F%3EIf%20the%20%3CSTRONG%3Ehyperlinks%3C%2FSTRONG%3E%20are%20%3CSTRONG%3Email%20addresses%3C%2FSTRONG%3E%2C%20the%20word%20mailto%3A%20is%20also%20automatic%20output.%20As%20a%20result%2C%20you%20will%20receive%2C%20for%20example%2C%20the%20email%20address%20of%20the%20hyperlink%20as%20follows%3A%20mailto%3A%20nikolino%40excelsius.com%20%3CBR%20%2F%3E%20The%20following%20macro%20removes%20this%20addition%20and%20only%20outputs%20nikolino%40excelsius.com%20as%20a%20hyperlink.%20The%20addition%20mailto%3A%20is%20removed.%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3EPublic%20Sub%20Hyperlink_lino_mail%20address%20()%0ADim%20hlink%20As%20Hyperlink%0Ai%20%3D%201%0A'Read%20out%20the%20hyperlink%20address%0AFor%20Each%20hlink%20In%20Sheets%20(1)%20.Hyperlinks%0Amail%20%3D%20hlink.Address%0Amailneu%20%3D%20Right%20(mail%2C%20Len%20(mail)%20-%207)%0ASheets%20(1)%20.Cells%20(i%2C%202)%20.Value%20%3D%20mail%20new%0Ai%20%3D%20i%20%2B%201%0ANext%20hlink%0AEnd%20Sub%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CBR%20%2F%3EWith%20the%20help%20of%20the%20Right%20()%20function%2C%20this%20macro%20removes%20the%20addition%20%22mailto%3A%22%20from%20the%20read%20mail%20address.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20would%20be%20happy%20to%20know%20if%20I%20could%20help.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENikolino%3C%2FP%3E%3CP%3EI%20know%20I%20don't%20know%20anything%20(Socrates)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%20size%3D%222%22%3E*%20Kindly%20Mark%20and%20Vote%20this%20reply%20if%20it%20helps%20please%2C%20as%20it%20will%20be%20beneficial%20to%20more%20community%20members%20reading%20here.%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hi Experts,

 

Can someone pls  help me and provide me Macro VBA code excel template wherein i have list of website addresses and need to search e-mail id from the entire website by running Macro VBA code and paste it in excel.

 

Regards

 

NKD

7 Replies

@nkd8477 

To create a VBA code, you should have more information on how to add internet addresses and lines / columns where it should be added. A lot of work, this is close to commissioned work, as it would have to be specially tailored so that it should work properly.
Try it in advance with this information, maybe you can solve your problem faster and better.

Import data from external data sources (Power Query)

https://support.microsoft.com/en-gb/office/import-data-from-external-data-sources-power-query-be4330...

 

I would be happy to know if I could help.

 

Nikolino

I know I don't know anything (Socrates)

 

* Kindly Mark and Vote this reply if it helps please, as it will be beneficial to more Community members reading here.

@nkd8477 

Please check this post https://stackoverflow.com/questions/19976326/getting-links-url-from-a-webpage-excel-vba if helps, that's to get all links from the web page. 

@Sergei Baklan @Nikolino  Hi, thanks for the info. i do not have any hands on and idea in programming. i want to extract e-mail id's in excel from the multiple websites on click of button through macro code..

 

i appreciate if you can help me in providing working excel with above requirements

 

The whole thing is not so easy to deal with. You would have to know the internet address, where it should be saved, in which columns / lines, etc., this is commissioned work in my opinion and I don't have the time for that. However I'm out of the number, I can't help. Wish you success in your project with a lot of health, joy and love. Nikolino I know I don't know anything (Socrates)

@Nikolino In excel sheet 1 column A will be website addresses and in column B will fetch e-mail id's of website addresses given A.

 

 

@nkd8477 

 

Maybe this will help you to create your own VBA code or everything as you wish.

 

Hyperlinks via VBA

With this macro all hyperlinks of a defined cell range can be read out. In this example, the macro scans column A and lists the results, i.e. all hyperlinks read in column B.

 

Public Sub Hyperlink_niko ()
'Read out the hyperlink address
Dim hlink As Hyperlink
i = 1
For Each hlink In Sheets (1) .Hyperlinks
Sheets (1) .Cells (i, 2) .Value = hlink.Address
i = i + 1
Next hlink
End Sub

 


If the hyperlinks are mail addresses, the word mailto: is also automatically output. As a result, you will receive, for example, the email address of the hyperlink as follows: mailto: nikolino@excelsius.com
The following macro removes this addition and only outputs nikolino@excelsius.com as a hyperlink. The addition mailto: is removed.

 

Public Sub Hyperlink_lino_mail address ()
Dim hlink As Hyperlink
i = 1
'Read out the hyperlink address
For Each hlink In Sheets (1) .Hyperlinks
mail = hlink.Address
mailneu = Right (mail, Len (mail) - 7)
Sheets (1) .Cells (i, 2) .Value = mail new
i = i + 1
Next hlink
End Sub

 


With the help of the Right () function, this macro removes the addition "mailto:" from the read mail address.

 

 

I would be happy to know if I could help.

 

Nikolino

I know I don't know anything (Socrates)

 

* Kindly Mark and Vote this reply if it helps please, as it will be beneficial to more Community members reading here.

@Nikolino thanks but this is not i am looking for.

 

Example - i have site www.cnbc.com in Colum A in Sheet1.

 

i want that on click on button the macro code should run and should scan this above website and should search for e-mail id's in the page and when found it should paste it in column B in excel.