can i webquery csv chart directly into 2darray?

PKiss

New Member
Joined
Sep 22, 2011
Messages
34
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.
<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>
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?
Any help would be appreciated. :D
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
I've already figure out how to solve it with a Sub.
... so show your sub code then.
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?
Any help would be appreciated. :D
What do you mean, alter the worksheet with a function??? You enter the function into the worksheet and it returns the results ... there is no alteration from within any functions, that's not how functions operate.
 
Upvote 0

Forum statistics

Threads
1,224,879
Messages
6,181,531
Members
453,054
Latest member
ezzat

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top