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.
Bookmarks