Get Weather Using VBA
Knowing that RSS is consumable with Excel (XML versions), I whipped up a barebones* example of getting the current and daily forecasted weather into Excel.
You can download the Weather Spreadseet here.
Simply enter a City and State and hit the “Get Weather” button. If the inputs are valid, your spreadsheet will return data looking something like this:
Looks like possible rain for the running of the derby today 😉
*This is a barebones example to demonstrate how to get weather into Excel. I included only an “On Error Resume Next” instead of detailed error handling, and the weather is returned as single string (ideally this string would be parsed).
VBA Coding Made Easy
Stop searching for VBA code online. Download our free add-in to quickly insert any of the sample code found on our site into the Visual Basic Editor.Free Download!
Did you find this VBA tutorial useful? Then share it with your friends and colleagues: