I was wondering if its possible to web query, in my case yahoo historical stock data which is a .csv, into a 2darray or array of arrays. The reason i ask is that i am trying to solve a certain assignment in a different way.
Any help would be appreciated. :D
I've already figure out how to solve it with a Sub. But i am trying to see if i can solve it using just a function. Since i cant alter the worksheet with a function im trying to figure out how/if its possible. A work around?<table border="0" cellpadding="0" cellspacing="0" width="845"><col width="845"><tr height="80"> <td class="xl65" style="height:60.0pt;width:634pt" height="80" width="845">Create a VBA function that will return an array of closing prices for a given equity (using ticker), using an http request in VBA of a single CSV from Yahoo Finance. For example, PriceHistory(strTicker As String, dtStartDate As Date, dtEndDate As Date, Optional bAscending As Boolean = True) As Variant. Experiment with using this function in Excel as an array formula, i.e. called from cells on a sheet; of course it could also be called via VBA.</td> </tr></table>
Any help would be appreciated. :D