Macro to grab URLs after the "at" word

nobleprince

New Member
Joined
Nov 12, 2013
Messages
1
Hi,

The requirement is to capture the URL's from a search engine (e.g. Google, Bing or Yahoo, etc) and to insert the domain name into column H. The Macro should take the company name from the spreadsheet for example, Rockwell Collins, put Rockwell Collins into a search engine, and then do a search for the words "Rockwell Collins" AND .co.uk. OR .com within only the first page of the search engine. The matching result should then be put into the appropriate Column H within the spreadsheet.

If the company name within the search engine page is the same two or more times, then the returned domain name should be captured in the following order/preference:
.co.uk (first choice)
.com (second choice)

I have included a BEFORE and AFTER example for the expected output.
BEFORE:
Senior Systems Engineer at Rockwell Collins
Core Infrastructure Engineer
at FactSet Research Systems
Network Installation Engineer at NG Bailey IT Services
Support Engineer at netConsult Ltd
Engineering Manager Land and Rail Systems
"senior systems engineer" at General Dynamics
Network Forensic Engineer at IBM

AFTER:
rockwellcollins.com
factset.com
ngbailey.co.uk
netconsulting.co.uk
generaldynamics.com
ibm.co.uk

<tbody>
</tbody>

Any questions, let me know.
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

Forum statistics

Threads
1,221,814
Messages
6,162,131
Members
451,743
Latest member
matt3388

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