Copy text from webpages - loop?

daveasu

Board Regular
Joined
Jan 4, 2012
Messages
53
Hi All,

I'm a VBA beginner I would like to copy text from a webpage that is not in a table. The text is basically a daily post from this calendar year.

The individual page URLs have the date in the URL. For example, these would be the pages from the first 4 days of March:
webpage.com/dailypost/2012/03/01?version=xyz
webpage.com/dailypost/2012/03/02?version=xyz
webpage.com/dailypost/2012/03/03?version=xyz
webpage.com/dailypost/2012/03/04?version=xyz

There is other text on the daily post webpage, but the text I would like to copy always has text like “Daily Post Starts Here” right before and always has the same “Daily Post Ends Here” at the end. I would like to retain the HTML formatting of the text if possible?

Would creating 365 cells with each unique URL work, and then loop through each one?
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

Forum statistics

Threads
1,214,628
Messages
6,120,618
Members
448,973
Latest member
ChristineC

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