The below code needs to be adjusted into a VBA function - that has three arguments: Ticker, Date, Type, where Type can be: Open, High, Low, Close or Volume. When used in excel in a cell it should return the corresponding value as per Google Finance website (this will be a number or if not available "N/A").
At the moment the code below is used for downloading the full data (type + date range), however the function should be referring to just one value.
Dim DataSheet As Worksheet
Dim EndDate As Date
Dim StartDate As Date
Dim Symbol As String
Dim qurl As String
Dim nQuery As Name
Dim LastRow As Integer
[url removed, login to view] = False
[url removed, login to view] = False
[url removed, login to view] = xlCalculationManual
Sheets("Data").[url removed, login to view]
Set DataSheet = ActiveSheet
StartDate = [url removed, login to view]("startDate").Value
EndDate = [url removed, login to view]("endDate").Value
Symbol = [url removed, login to view]("ticker").Value
Sheets("Data").Range("a1").[url removed, login to view]
qurl = "[url removed, login to view]" & Symbol
qurl = qurl & "&startdate=" & MonthName(Month(StartDate), True) & _
"+" & Day(StartDate) & "+" & Year(StartDate) & _
"&enddate=" & MonthName(Month(EndDate), True) & _
"+" & Day(EndDate) & "+" & Year(EndDate) & "&output=csv"
With Sheets("Data").[url removed, login to view](Connection:="URL;" & qurl, Destination:=Sheets("Data").Range("a1"))
.BackgroundQuery = True
.TablesOnlyFromHTML = False
.SaveData = True
Sheets("Data").Range("a1").[url removed, login to view] Destination:=Sheets("Data").Range("a1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
Semicolon:=False, Comma:=True, Space:=False, other:=False
Sheets("Data").Columns("A:G").ColumnWidth = 12
I have an Excel function ready for this. I created a demo and you can see it at [login to view URL]
Bu iş için 11 freelancer ortalamada $45 teklif veriyor
Please send me the actual file so I can see the given parameters on the Data sheet. ............................................................................
Hi Sir/Madam. Ready to start. Thanks ..............................................................................................
Hey There, Thanks for posting the project. Its looks feasible and am Interested to do it. Next steps: Lets discuss/validate the complete requirement and I can start to get this done with required quality ou Daha Fazla
Hi there, I have a vast experience in Excel and VBA and would be happy to help you on the project. Best regards, Eugene
Hi, I have more than 14 years of Excel/VBA exp and I am expert in this kind of work. I have completed more than 225 projects. Please look at the feedback left by my employers to know more about my work. Wai Daha Fazla
I am an expert in delivering customized scripts and like to discuss further about the project requirements
Hello. It was interesting for me to make something similar (I'm just learning web-parsing). So, the function is almost complete, I just need a nice sample: correct link :-) for testing I didn't used Queries, but used Daha Fazla
Dear Sir, I am very much interested in this project. With 8 year of corporate experience as Business Analyst and Reporting Specialist I am an expert in excel. I am new to freelancing, I need to establish a reput Daha Fazla
I am an expert in Microsoft Excel and had recently done a very similar task. creating query connection adjusting the VBA code and data manipulation to suit your format required.
Hello how are you may i help you ? can you send me more details about the requirements so i can send you the cost estimations? Let my profile approve the quality of work ---------------------------------------- Daha Fazla