MrAsh
New Member
- Joined
- Nov 3, 2006
- Messages
- 23
Hi all,
Hope someone can help with something i'm trying to achieve which will save me bags of time if i can get it to work. What i'm trying to do is this;
i have a long list of websites, and each website has information i want to extract. Here's an example of one of them.
What i'd like to do ideally is to have a macro that will go to the first cell (say A1) where the hyperlink is, open up iE, see the "Address:" line, copy it and paste it into A1 on worksheet2, then to read the next line "Headteacher:" and copy that and paste into B2 on worksheet2...and so on and so on until it reaches the last ("DFES no:") and stops.
WIth that completed it should move onto the next hyperlink in the next cell - which will be B2 on worksheet1, and repeat the process again, until it finally reaches an empty cell and runs out of hyperlinks to follow (in this case it'll be around A260).
i've tried creating a macro by just recording and doing it, and i can get it to open up a browser, copy one line and paste it, but i can't get it to move on and repeat the process for each item of data.
The websites and data change, but each page always follows the same format, btw.
i've been through newsgroups, microsoft's knowledge base and loads of excel tips sites, but i can't a solution find anywhere. If anyone could show me how, or point me in a direction where i could learn how i'd be very grateful as it'll save me literally hours of boring copying and pasting.
Many thanks!
(i'm using Excel 2002 SP3 and WinXP with iE7)
Hope someone can help with something i'm trying to achieve which will save me bags of time if i can get it to work. What i'm trying to do is this;
i have a long list of websites, and each website has information i want to extract. Here's an example of one of them.
What i'd like to do ideally is to have a macro that will go to the first cell (say A1) where the hyperlink is, open up iE, see the "Address:" line, copy it and paste it into A1 on worksheet2, then to read the next line "Headteacher:" and copy that and paste into B2 on worksheet2...and so on and so on until it reaches the last ("DFES no:") and stops.
WIth that completed it should move onto the next hyperlink in the next cell - which will be B2 on worksheet1, and repeat the process again, until it finally reaches an empty cell and runs out of hyperlinks to follow (in this case it'll be around A260).
i've tried creating a macro by just recording and doing it, and i can get it to open up a browser, copy one line and paste it, but i can't get it to move on and repeat the process for each item of data.
The websites and data change, but each page always follows the same format, btw.
i've been through newsgroups, microsoft's knowledge base and loads of excel tips sites, but i can't a solution find anywhere. If anyone could show me how, or point me in a direction where i could learn how i'd be very grateful as it'll save me literally hours of boring copying and pasting.
Many thanks!
(i'm using Excel 2002 SP3 and WinXP with iE7)