+ Reply to Thread
Results 1 to 2 of 2

Formatting data pulled from web

  1. #1
    Registered User
    Join Date
    05-25-2011
    Location
    Austin, Texas
    MS-Off Ver
    Excel 2007
    Posts
    1

    Formatting data pulled from web

    Hi all,

    I have done a bit of programming work with VBA and SQL server, but none in the past year or so. I am currently trying to design a macro in excel that will pull hourly weather data from a website for a particular city and format it.

    So far I have it to the point where it will cycle through the pages for each day and pull the correct table of data, but the problem is that the first table gets put in starting at cell A1 and every new table after that also gets put into A1, pushing the previous data to the right (so that it now resides in M1, and further after that etc).

    What do I need to do in order to get new data to appear below what is already on the sheet? I know I need to fiddle with the "Destination:=" line, but I'm not sure what to do with it since I can't just tell it to arbitrarily skip a certain number of lines since each day has different hourly data (some days have more than one entry per hour). I tried using the xlUp and xlDown functions but I get an error whenever I try to run the macro to pull the data.

    Also, would there be a way to format the data as well so that I only get one entry per hour? i.e. if say there is more than one entry from 1:00 PM to 2:00 PM I delete all the entries but one, so that only 24 entries appear for each day -- 1 per hour.

    Here is the code I have so far -- after messing around with multiple variables and such counting rows I stripped it down to where it'd just pull the data, altho formatted incorrectly.

    Please Login or Register  to view this content.

    Thanks all for your help.

  2. #2
    Valued Forum Contributor Charles's Avatar
    Join Date
    02-10-2004
    Location
    Biloxi
    MS-Off Ver
    Windows 7, Excel 2003,2007 & Mac2011
    Posts
    845

    Re: Formatting data pulled from web

    cps439,

    See if this works for you.



    Please Login or Register  to view this content.
    Charles

    There are other ways to do this, this is but 1 !
    Be Sure you thank those who helped.
    IF YOU'RE SATISFIED BY ANY MEMBERS RESPONSE TO YOUR ISSUE PLEASE USE THE STAR ICON AT THE BOTTOM LEFT OF THE POST UNDER THEIR NAME.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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