Results 1 to 7 of 7

Loop Import HTML Tables, Extract 3 Cells from Table, Do Calculation on Cells

Threaded View

  1. #1
    Registered User
    Join Date
    04-05-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    3

    Loop Import HTML Tables, Extract 3 Cells from Table, Do Calculation on Cells

    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!
    Attached Files Attached Files
    Last edited by jhowland; 08-02-2013 at 08:48 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Extract MSExcel cells into MSWord as Sentences with an If Then Loop
    By jajamason in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-26-2012, 11:22 AM
  2. Copying HTML tables with multi-line cells
    By martix in forum Excel General
    Replies: 0
    Last Post: 03-11-2012, 01:15 PM
  3. HTML Table import
    By Ryan Hafey in forum Excel General
    Replies: 2
    Last Post: 08-03-2006, 01:10 AM
  4. [SOLVED] Import HTML table
    By Bill in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-28-2006, 01:35 PM
  5. Replies: 2
    Last Post: 11-10-2005, 09:10 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1