Hi Everyone,
Bit of a challenge I have come up against to import tables stored in HTML across a number of subfolders.
Every day an HTML file is dumped on a server subfolder in the format of \\server\archive\YYYYMM\DD\daily_rates.htm (the server does not have http accessibility, and I get file not found if I try existing scripts I have seen). I have attached the daily rates table (has extension txt, change to htm), with some modifications for privacy (there are actually a larger number of tables listed, but we only use the ones in the attached as provided by a 3rd party).
What I want to do is:
1. Open the subdirectory YYYMM\DD\daily_rates.htm
2. Copy the data from particular cells in the tables into another sheet (the headings should be DATE, TERM, RATE1, RATE2):
- Rate 1 and Rate 2 for 1M - 3M from Base Yield Curve table
- BBSWMID (as Rate1) for 4M-6M from AFMA Data, and Rate2 for 4M-6M from Base Yield Curve Table
3. Do some additional calculations to generate 7M-12M numbers off the 1-6M numbers, and some additional calculations for each rate in columns to the right of the data (for script purposes, say 7M = (1.02 * 1M), 8M = (1.02 * 2M) etc, additional column is Datevalue&Month of the row)
4. Loop onto the next day/month/year, with the results as new rows on the end of the previous day (there will be no data for any weekend date, or public holiday)
I've seen a few scripts that do parts of what I'm after, but I'm not competent enough in VBA to put it all together.
Any ideas where I should start?
Thanks!
Bookmarks