+ Reply to Thread
Results 1 to 74 of 74

What is the Problem in this Code to Pull Information from Google Finance

  1. #1
    Registered User
    Join Date
    05-05-2013
    Location
    Bhubaneswar, India
    MS-Off Ver
    Excel 2013
    Posts
    91

    What is the Problem in this Code to Pull Information from Google Finance

    Ref Cross Post at other forum on this same topic: https://www.mrexcel.com/forum/excel-...ml#post5045934

    I am attaching a worksheet. The purpose of this worksheet is to pull the name of the Companies (against the corresponding symbol) from Google Finance. This worksheet is not presently working and showing the runtime error.

    I am trying to represent the whole thing at the level of my best....

    How this Worksheet Operates:
    At first step I put the list of the name of the symbols in the sheet entitled "List of Pre-added Symbols"

    In the second step, in the Sheet "Symbols" I push the button "Copy Over" to copy the list of symbols from the sheet entitled "List of Pre-added Symbols". After that I push the button "Run". Immediately all the cells in the column "EXCHANGE" will be filled up "NSE", all the cells in the column "TYPE" will be filled up "STOCK", and all the cells in the column "Currency" will be filled up "INR", all the cells in the column "MINTICK" will be filled up BY "0.01" and the Cells in the Column "DESCRIPTION" will be be pulled from Google Finance Website. From the Google Finance Website the full name of the company against the corresponding symbol will be pulled in.

    e.g if the symbol is "ADANIENT" => the exchange name will be "NSE", and the name of the company "Adani Enterprise Ltd" will be appeared in the corresponding "Description" column . this name will be fetched from the google finance site: https://www.google.com/search?tbm=fi...vgTKj6ngDg_5:0

    similarly
    e.g if the symbol is "ABB" => the exchange name will be "NSE", and the name of the company "ABB India Ltd" will be appeared in the corresponding "Description" column . this name will be fetched from the google finance site:https://www.google.com/search?tbm=fi...vQS2uqv4Bw_5:0

    The case is like this:
    Screenshot 1.jpg
    Screenshot 2.jpg

    The Runtime Error is coming like this:

    Screenshot 3.PNG

    Please help me to solve this issue.

    Regards
    Attached Files Attached Files
    Last edited by indraji2001; 04-08-2018 at 05:12 PM.

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: What is the Problem in this Code to Pull Information from Google Finance

    Access denied is access denied, I think the issued is that and not the code.
    Use debug and go through it step-by-step
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  3. #3
    Registered User
    Join Date
    05-05-2013
    Location
    Bhubaneswar, India
    MS-Off Ver
    Excel 2013
    Posts
    91

    Re: What is the Problem in this Code to Pull Information from Google Finance

    @keebellah
    thanks for your reply
    I am almost no idea about VBA. I just use this sheet for my personal purpose. So can you please help to sort out the problem by what ever you are suggesting "By Using Debug"?
    Last edited by indraji2001; 04-08-2018 at 06:11 AM.

  4. #4
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: What is the Problem in this Code to Pull Information from Google Finance

    I perfectly understand that you are at loss, but if you use Excel with vba (macros and more) but have absolutely no knowledge of VBA it will be quite difficult to even try things out.
    You must at least have some understanding.
    I will download your file and see if I can find what is causing the problem (I doubt very much that I will be able to find it) but who knows.
    I suggest you Google for VBA basics and start learning a little of it, will help you if you work more often with files like this.
    The other option is to contact the person responsible for this file and it's code and have him/her help you.

  5. #5
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: What is the Problem in this Code to Pull Information from Google Finance

    First run.
    Access denied, like I mentioned in the first place, no problem with the file, you do NOT HAVE ACCESS TO THE SITE, that is why it tell's you Access denied

    The red bold marked text is where it stops


    Please Login or Register  to view this content.

  6. #6
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: What is the Problem in this Code to Pull Information from Google Finance

    Via PowerQuery there is no "access denied" so i don't think it is site problem

  7. #7
    Registered User
    Join Date
    05-05-2013
    Location
    Bhubaneswar, India
    MS-Off Ver
    Excel 2013
    Posts
    91

    Re: What is the Problem in this Code to Pull Information from Google Finance

    @Keenbellah

    Yes I am new to excel and I agree I have no knowledge in VBA. But trust me I have come to this group to learn the things. But I should be also given some time - hope you will also agree. If I ask anybody the hardcore organic synthesis - I think his condition will be also same like me as I am feeling in this forum ..

    I think sandy666 (a respectable member of this group) has seen how much interested I am to learn the things out of here !

    Yes for this thread I cam say "I am at loss" ..actually this worksheet I did not made, some guy made it and he is no more in this world. If he were there I only took help from him only. Since I am really helpless in this regard, I posted it (I tried to explain it as much as detail) for some kind help from the experts like you.

    I am testing and get back to you.
    Regards

  8. #8
    Registered User
    Join Date
    05-05-2013
    Location
    Bhubaneswar, India
    MS-Off Ver
    Excel 2013
    Posts
    91

    Re: What is the Problem in this Code to Pull Information from Google Finance

    @Keenbellah

    I noted that there is no problem with the site.
    if you just put this link in the browser it will give you the correct information

    e.g. you just check with this link :
    http://www.google.com/finance?q=NSE:ADANIENT
    http://www.google.com/finance?q=NSE:ABB

    YOU GET THE CORRECT WEBSITE FROM WHICH THE INFORMATION WILL BE DRAGGED.
    Regards

  9. #9
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: What is the Problem in this Code to Pull Information from Google Finance

    here is example (no any restriction)

    PowerQuery of course

    it will refresh on open file or Ctrl+Alt+F5 or define each connection as you wish (minimum 1 minute)
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    05-05-2013
    Location
    Bhubaneswar, India
    MS-Off Ver
    Excel 2013
    Posts
    91

    Re: What is the Problem in this Code to Pull Information from Google Finance

    @sandy666
    you are master of Power Query. An excellent work you again showed in excel

    What ever I am asking in my original worksheeet - that can be done by powerquery?

  11. #11
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: What is the Problem in this Code to Pull Information from Google Finance

    Happy PowerQuery to you.
    Like I keep saying, never too old to learn

  12. #12
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: What is the Problem in this Code to Pull Information from Google Finance

    original file with VBA??? I don't know if someone will translate vba to normal language maybe it will be possible
    but I think you should wait for answer about vba from Keebellah

    edit:
    3 minutes too late

  13. #13
    Registered User
    Join Date
    05-05-2013
    Location
    Bhubaneswar, India
    MS-Off Ver
    Excel 2013
    Posts
    91

    Re: What is the Problem in this Code to Pull Information from Google Finance

    @Keebellah

    yes two days back one small thing I learned from sandy666.....he is master of that. I am really in deep trouble. It is not possible to enter those 500 company names manually one by one in the excel list.
    I do not know why that worksheet is not working!!

  14. #14
    Registered User
    Join Date
    05-05-2013
    Location
    Bhubaneswar, India
    MS-Off Ver
    Excel 2013
    Posts
    91

    Re: What is the Problem in this Code to Pull Information from Google Finance

    @sandy666

    Yes I am waiting sincerely if keebellah is kind enough to help me....

  15. #15
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: What is the Problem in this Code to Pull Information from Google Finance

    if you ask for too many (symbols/tickets) you will run into troubles = new google rules, so i think this is why your vba got access denied

    We're sorry...

    ... but your computer or network may be sending automated queries. To protect our users, we can't process your request right now.
    Last edited by sandy666; 04-08-2018 at 03:43 PM.

  16. #16
    Registered User
    Join Date
    05-05-2013
    Location
    Bhubaneswar, India
    MS-Off Ver
    Excel 2013
    Posts
    91

    Re: What is the Problem in this Code to Pull Information from Google Finance

    @sandy666
    but is it working with 3-4 symbols?

  17. #17
    Registered User
    Join Date
    05-05-2013
    Location
    Bhubaneswar, India
    MS-Off Ver
    Excel 2013
    Posts
    91

    Re: What is the Problem in this Code to Pull Information from Google Finance

    @sandy666

    then can this be done from msn like this:
    https://www.msn.com/en-in/money/stoc...CE&form=PRFIEQ

  18. #18
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: What is the Problem in this Code to Pull Information from Google Finance

    I checked two symbols like you can see in last example file (with example from NSE)
    I didn't check more because this is boring (finance and statistics is boring )
    so maybe try change your vba to ms money (with any help)
    or
    like I said a few posts ago - use Commercial Service

  19. #19
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: What is the Problem in this Code to Pull Information from Google Finance

    here is test with MSN
    but someone should adjust vba to get proper data
    no "access denied"

    that's all what I can do with this for you. good luck

  20. #20
    Registered User
    Join Date
    05-05-2013
    Location
    Bhubaneswar, India
    MS-Off Ver
    Excel 2013
    Posts
    91

    Re: What is the Problem in this Code to Pull Information from Google Finance

    @sandy666

    Thanks so much ! I could not request you much since you are expertise on power query. But what you have doone is beyond my expectation.
    I would earnestly request @Keebellah or some other VBA expert to do help at his point. Please
    Regards

  21. #21
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,839

    Re: What is the Problem in this Code to Pull Information from Google Finance

    Rule 08: Cross-posting Without Telling Us

    Your post does not comply with Rule 8 of our Forum RULES. Do not cross-post your question on multiple forums without telling us about your threads on other forums.

    Post a link to any other forums where you have asked the same question. If you have fewer than 10 posts here, you will not be able to post a link, but you must still tell us where else you have asked the question.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).

    No further help to be offered, please, until the OP has complied with this request.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  22. #22
    Registered User
    Join Date
    05-05-2013
    Location
    Bhubaneswar, India
    MS-Off Ver
    Excel 2013
    Posts
    91

    Re: What is the Problem in this Code to Pull Information from Google Finance

    @Ali
    Please apologize me since I could not understand the meaning of cross post. I thought cross-post means posting the same thing in other sub-forums of this forum. So I think it is a communication gap. I am from non-english speaking country so probably I could not get its meaning. You may note that I have already told in other forum that such mistake will not be done anymore from my side.
    From that forum I got no solution till now and you may also watch that I have asked the moderator to delete my post from that forum - that much I can do to compensate my unintentional fault at this time.

    sandy666 has already done some development. If you think no further help will be provided to me, I have nothing to say since you can do that as a moderator of this forum. But from my side I can tell that this thing will not happen anymore, trust me. Rest is at your hand.

    Regards

  23. #23
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,839

    Re: What is the Problem in this Code to Pull Information from Google Finance

    You need to supply a link to the post on the other forum.

  24. #24
    Registered User
    Join Date
    05-05-2013
    Location
    Bhubaneswar, India
    MS-Off Ver
    Excel 2013
    Posts
    91

    Re: What is the Problem in this Code to Pull Information from Google Finance

    @Ali

    Do you want to say that I will give the ref of this link: https://www.excelforum.com/excel-pro...ml#post4879348

    to https://www.mrexcel.com/forum?

  25. #25
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,839

    Re: What is the Problem in this Code to Pull Information from Google Finance

    Yes - thank you.

    The same rule applies on most forums.

  26. #26
    Registered User
    Join Date
    05-05-2013
    Location
    Bhubaneswar, India
    MS-Off Ver
    Excel 2013
    Posts
    91

    Re: What is the Problem in this Code to Pull Information from Google Finance

    @Ali

    I have done that on that forum. I could not understand the meaning of cross posting as I mentioned earlier to you, so this fowl has happened.
    And if you do not allow to provide any help to me on this post then if you want you can delete this post - the decision is yours. Unintentionally this happened, however I broke the rule. So obviously the forum has the right not to provide any help anymore. Decision is yours.
    Regards

  27. #27
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: What is the Problem in this Code to Pull Information from Google Finance

    I agree with @sandy666
    But I will take a look tomorrow (it's bedtime here) and see if I can see how 'access denied' could be avoided

  28. #28
    Registered User
    Join Date
    05-05-2013
    Location
    Bhubaneswar, India
    MS-Off Ver
    Excel 2013
    Posts
    91

    Re: What is the Problem in this Code to Pull Information from Google Finance

    @Keebellah

    thanks for your kind consideration. if the forum helps then it is well and good, otherwise I am also helpless here due my limitation.
    Goodnight

  29. #29
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,839

    Re: What is the Problem in this Code to Pull Information from Google Finance

    You have provided the cross-post link so you can receive help.

    I suggest you have a read of the forum rules to understand the expectations here: https://www.excelforum.com/forum-rul...rum-rules.html

  30. #30
    Registered User
    Join Date
    05-05-2013
    Location
    Bhubaneswar, India
    MS-Off Ver
    Excel 2013
    Posts
    91

    Re: What is the Problem in this Code to Pull Information from Google Finance

    @Ali
    Thanks for your cooperation. Hope Keebellah Will guide me at his free time as he mentioned above. Let us wait and see.

  31. #31
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,839

    Re: What is the Problem in this Code to Pull Information from Google Finance

    I am not co-operating with you: I am applying the rules of the forum, with which YOU have now co-operated and must continue to do so going forward.

    I am sure that Keebellah will help you once he is back online. You will need to wait patiently.

  32. #32
    Registered User
    Join Date
    05-05-2013
    Location
    Bhubaneswar, India
    MS-Off Ver
    Excel 2013
    Posts
    91

    Re: What is the Problem in this Code to Pull Information from Google Finance

    @Ali
    Definitely I will wait . I also Hope Keebellah will give the solution ....hope for the best

  33. #33
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: What is the Problem in this Code to Pull Information from Google Finance

    Hi guys, got stuck with a project I'm working on, hope to take a shot at it after dinner tonight, sorry for the delay

  34. #34
    Registered User
    Join Date
    05-05-2013
    Location
    Bhubaneswar, India
    MS-Off Ver
    Excel 2013
    Posts
    91

    Re: What is the Problem in this Code to Pull Information from Google Finance

    @Keebellah

    you take your time. no issue. here every expert gives the voluntary service. so we have to keep patience. when you will get time just check it ...that much I can request

  35. #35
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: What is the Problem in this Code to Pull Information from Google Finance

    change this line:
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    then Run

    and access denied will disappear but code should be checked by someone who knows VBA better than me because result is not like should be (IMO)

  36. #36
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: What is the Problem in this Code to Pull Information from Google Finance

    Thanks to @Sandy666 the Access denied is gone,
    The code is abracadabra for me but it suns and does something in the 'Database' sheet.
    The code stopped with an error because the last name in Database was not found.
    I added a check if the Instr result is 0 to skip it but for the rest you will need somebody that understands how to do this for you.

  37. #37
    Registered User
    Join Date
    05-05-2013
    Location
    Bhubaneswar, India
    MS-Off Ver
    Excel 2013
    Posts
    91

    Re: What is the Problem in this Code to Pull Information from Google Finance

    @sandy666
    yes access denied is not coming ..but for VBA I think we have to wait for expert opinion, otherwise helpless condition.

  38. #38
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: What is the Problem in this Code to Pull Information from Google Finance

    Part of the VBA does work, you can see that the date is updated, and it is solvable but then we need to CLEARLY understand what the OP is trying to retrieve, the use of InStr as it is being used now is in many places incorrectly applied.

    Below is a porting of the content of x and the company name NSE:ABAN is found but from there on it's the OP's responsability to tell us exactly what he/she wants

    Please Login or Register  to view this content.

  39. #39
    Registered User
    Join Date
    05-05-2013
    Location
    Bhubaneswar, India
    MS-Off Ver
    Excel 2013
    Posts
    91

    Re: What is the Problem in this Code to Pull Information from Google Finance

    @Keebellah

    Thanks for reply.
    Yes if you follow the picture at the very beginning hope you will understand what I wanted to indicate. Well, I am trying to clarify it in more detail manner:

    In India the official stock exchange is NSE (National Stock Exchange). So all the companies against all the symbols are registered with this NSE with their share holding. so the exchange is same for all companies. Currency is also same - INR. Type "Stock" is applicable for all the symbols.

    1. The list of symbols will be copied from the 2nd sheet "List of Pre-added Symbols" to the First sheet "Symbols"
    2. Against all these symbols Exchange, Type and Currency will be same i.e. NSE, STOCK, and INR.
    3. Now applying this list symbols and Exchange this work sheet will pull the Companies' Full name (from Google Finance) individually against each symbol.
    4. Once it is done I will copy the whole thing to my desired working place with this same worksheet Format

    if you want to make anything more clear to me, feel free to ask me - I will try my best to make it understandable before you
    Regards

  40. #40
    Registered User
    Join Date
    05-05-2013
    Location
    Bhubaneswar, India
    MS-Off Ver
    Excel 2013
    Posts
    91

    Re: What is the Problem in this Code to Pull Information from Google Finance

    @keebellah
    could I explain before you what actually I want ?
    if nor please mention at which points I have to be more elaborate?
    regards

  41. #41
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: What is the Problem in this Code to Pull Information from Google Finance

    Instead of 'could' I would yes, your 'should' explain and if possible illustrate it.
    I have attached in text form the retrieved content for NS:ABAN, that way you can see how it looks.

    Mark the keywords of what you want and explain as much as possible, do it a Word document and paste color whatever to make it as clear as possible.

    I have no knowledge of these things, only VBA

    You will probably have to open the text file in NotePad++ to or some other to view it as XML
    Attached Files Attached Files

  42. #42
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: What is the Problem in this Code to Pull Information from Google Finance

    rather html change .txt to .html or simply add .html on the end of the name of this file then drag to the your browser window

  43. #43
    Registered User
    Join Date
    05-05-2013
    Location
    Bhubaneswar, India
    MS-Off Ver
    Excel 2013
    Posts
    91

    Re: What is the Problem in this Code to Pull Information from Google Finance

    @sandy666
    I did that by adding extension .html in place in place of .txt but getting error ...can you just send me the clip how you are doing this

  44. #44
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: What is the Problem in this Code to Pull Information from Google Finance

    download this file: NSE-ABAN section.txt‎ on Desktop
    you should see .txt
    if not this is problem of your windows feature which hidding standard extensions
    but if you see - click once on this file (to select it)
    hit F2, go on the end then replace txt to html, then hit enter. (or twice enter and it should be opened in your default browser)

    or

    right click on this file in the post
    save link as...
    you'll see NSE-ABAN section.txt‎
    change txt to html
    then save

    ss.jpg
    Last edited by sandy666; 04-10-2018 at 10:49 AM.

  45. #45
    Registered User
    Join Date
    05-05-2013
    Location
    Bhubaneswar, India
    MS-Off Ver
    Excel 2013
    Posts
    91

    Re: What is the Problem in this Code to Pull Information from Google Finance

    @sandy666

    here is that error
    NSE-ABAN.PNG
    Last edited by indraji2001; 04-10-2018 at 10:53 AM.

  46. #46
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: What is the Problem in this Code to Pull Information from Google Finance

    so read this and post #11

  47. #47
    Registered User
    Join Date
    05-05-2013
    Location
    Bhubaneswar, India
    MS-Off Ver
    Excel 2013
    Posts
    91

    Re: What is the Problem in this Code to Pull Information from Google Finance

    @sandy666
    thanks brother from post 11 I cannot understand how I will check this with power query?

  48. #48
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: What is the Problem in this Code to Pull Information from Google Finance

    PowerQuery??? I didn't say that

    I said only, how you can read this file easier

  49. #49
    Registered User
    Join Date
    05-05-2013
    Location
    Bhubaneswar, India
    MS-Off Ver
    Excel 2013
    Posts
    91

    Re: What is the Problem in this Code to Pull Information from Google Finance

    @sandy666

    but it is the post 11
    post 11.PNG

  50. #50
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,839

    Re: What is the Problem in this Code to Pull Information from Google Finance

    The post shown is by Keebellah, not Sandy.

  51. #51
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: What is the Problem in this Code to Pull Information from Google Finance

    typo (should be 41), there is a link also (post #46) so if you click it will show you correct post

  52. #52
    Registered User
    Join Date
    05-05-2013
    Location
    Bhubaneswar, India
    MS-Off Ver
    Excel 2013
    Posts
    91

    Re: What is the Problem in this Code to Pull Information from Google Finance

    @Ali

    actually sandy666 advised me to read the post #11..So I referred that.

  53. #53
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,839

    Re: What is the Problem in this Code to Pull Information from Google Finance

    The link was to this post, actually: https://www.excelforum.com/excel-pro...ml#post4880379

  54. #54
    Registered User
    Join Date
    05-05-2013
    Location
    Bhubaneswar, India
    MS-Off Ver
    Excel 2013
    Posts
    91

    Re: What is the Problem in this Code to Pull Information from Google Finance

    @sandy666

    this what I am getting with notepad++ as advised by Keebellah
    NSE-ABAN.PNG
    Attached Images Attached Images

  55. #55
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: What is the Problem in this Code to Pull Information from Google Finance

    you cannot get a picture via Notepad (or something like that)
    I suggest to read attached file and post from Keebellah, no less no more
    but what you will do with this info I don't know

  56. #56
    Registered User
    Join Date
    05-05-2013
    Location
    Bhubaneswar, India
    MS-Off Ver
    Excel 2013
    Posts
    91

    Re: What is the Problem in this Code to Pull Information from Google Finance

    @sandy666
    I am also confused...I cannot understand...again .In a word file I will give the details (as much as possible) what I actually want to do as per Keebellah....you also please follow that one..

  57. #57
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: What is the Problem in this Code to Pull Information from Google Finance

    @post#54
    If you can read it in this form that's ok
    My way was "user friendly"
    but in this file and in post #46 is nothing about PowerQuery but only info from Keebellah and from GoogleTeam

    Nothing about how to resolve your problem

  58. #58
    Registered User
    Join Date
    05-05-2013
    Location
    Bhubaneswar, India
    MS-Off Ver
    Excel 2013
    Posts
    91

    Re: What is the Problem in this Code to Pull Information from Google Finance

    @keebellah
    I made a word file for this project to demonstrate actually what I want t do.
    Please go through the file. If you feel any problem to understand it, just let me know.
    regards
    Attached Files Attached Files

  59. #59
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,839

    Re: What is the Problem in this Code to Pull Information from Google Finance

    Post the details in a post here, not in a Word document.

  60. #60
    Registered User
    Join Date
    05-05-2013
    Location
    Bhubaneswar, India
    MS-Off Ver
    Excel 2013
    Posts
    91

    Re: What is the Problem in this Code to Pull Information from Google Finance

    @Ali
    I am now really cofused, frankly speaking. In post #41 keebellah asked me to post a word document through colour presentation, you are saying not to use word document ...what actually I should do? Really getting tired. whatever being asked - I am doing that only, but not getting the idea what actually I have to do?

  61. #61
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,839

    Re: What is the Problem in this Code to Pull Information from Google Finance

    There is not enough information in the Word document to bother separating it from the thread. If it is all here in the thread, then it is easier for everyone to follow. Just copy what's in the document to your next post in this thread.

    There are now over 60 posts in this thread. Members are trying very hard to help you and to make sense of what it is you are trying to do. I suspect they are probably getting tired, too, but they are sticking with you.

  62. #62
    Registered User
    Join Date
    05-05-2013
    Location
    Bhubaneswar, India
    MS-Off Ver
    Excel 2013
    Posts
    91

    Re: What is the Problem in this Code to Pull Information from Google Finance

    @Ali
    I cannot go the Page 5 from page 4. Beyond page 4 it is not going. Got your message only from the email. I clicked the last page, even after that it is not being directed to page 5 of this this thread.
    However one thing I will say "I have no doubt that members are giving their best to help me" I have full respect for them. I just wanted to mean I only did that what Keebellah asked me to do in post #41. Hope at that point I am not wrong that you will also agree. Ok I am copying from document to here.

  63. #63
    Registered User
    Join Date
    05-05-2013
    Location
    Bhubaneswar, India
    MS-Off Ver
    Excel 2013
    Posts
    91

    Re: What is the Problem in this Code to Pull Information from Google Finance

    @Ali
    please help me to go to page 5 so that I can post those documents from word to here. I am clicking on page last or page 5 but it is not going forward.

  64. #64
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,839

    Re: What is the Problem in this Code to Pull Information from Google Finance

    I have no idea what the problem is that you are now trying to explain - sorry.

    Here are the contents of your Word file from post #58, which is what I asked you to post here:

    There should be three sheets: Sheet 1 and Sheet 2
    Give the name of “Sheet 1” => “Preloaded Symbols” this sheet will contain the list of symbols along with exchange, type, currency, minitick.

    Now create Sheet 2 and Give the name of “Sheet 2” => “Symbols”. In this sheet (Symbols) create a button “Copy” on this sheet. Upon pressing this button all the columns will be copied from “Preloaded Symbols” =>“Symbols”. Create a button “Run” on this Sheet 2 (“Symbols”) which will grab the full names of the company (from Google Finance, as shown by screenshot in my #1 post) and will place those against the corresponding symbols.
    Make a “Clear” button on “Sheet 2” (whose name is basically “Symbols”). The function of this button is to clean everything from “Sheet 2” and make it ready for next cycle, if be required.
    You do NOT need to post the contents of Word files posted earlier in the thread.
    Last edited by AliGW; 04-11-2018 at 03:28 AM.

  65. #65
    Registered User
    Join Date
    05-05-2013
    Location
    Bhubaneswar, India
    MS-Off Ver
    Excel 2013
    Posts
    91

    Re: What is the Problem in this Code to Pull Information from Google Finance

    @Ali I am badly affected by viral fever and will come back to this issue after I will get well. Please keep the thread alive.
    Regards

  66. #66
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,839

    Re: What is the Problem in this Code to Pull Information from Google Finance

    All you need to do is post to it again when you are ready. We do not close or lock inactive threads.

  67. #67
    Registered User
    Join Date
    05-05-2013
    Location
    Bhubaneswar, India
    MS-Off Ver
    Excel 2013
    Posts
    91

    Re: What is the Problem in this Code to Pull Information from Google Finance

    @Ali
    Ok after my recovery I am back here.
    I am explaining here again what actually I require for:

    1. Create a Workbook and Five any name to it.
    2. In this workbook there will remain two sheets: "List of Symbols" and "Main Worksheet"
    3. In the sheet "List of Symbols" there will remain a list of symbols (the total no of symbols may be 1500 like that).
    4. In Another sheet "Main Worksheet" there will remain five columns : Symbols, exchange, type, currency, minitick and Description
    Symbols.PNG
    Main Worksheet.PNG

    5. In the sheet "List of Symbols" there will remain a button "Copy" which will copy the total list of symbols to the 1st Column of "Main Worksheet"
    6. Now this "Main Worksheet" will grab the full name of the symbol from google finance site. For example if it is SBIN, then Full name will be "State bank of India"
    Similarly if it is YESBANK, then Full name will be "YESBANK", if it is UNITEDBNK , then Full name will be "United bank of India". Exchange will always be NSE.
    Google Finance Page: https://www.google.com/search?stick=...vQTSx5LoBg_0:0

    In the google finance page if anybody types "SBIN" immediately he see that NSE:SBIN is popping up as follows to get the page of SBIN
    search symbol.jpg

    Please let me know now is it clear?
    Last edited by indraji2001; 06-12-2018 at 12:49 PM.

  68. #68
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,839

    Re: What is the Problem in this Code to Pull Information from Google Finance

    I am glad you are better!

    I cannot help with this query myself, however will you please attach a sample Excel workbook? We are not able to work with or manipulate a picture of one and nobody wants to have to recreate your data from scratch.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired results are also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.

  69. #69
    Registered User
    Join Date
    05-05-2013
    Location
    Bhubaneswar, India
    MS-Off Ver
    Excel 2013
    Posts
    91

    Re: What is the Problem in this Code to Pull Information from Google Finance

    @Ali
    Ok I attached here the test file.
    Actually only he can deal this problem who has the expertise in grabbing data from Web.
    Here the full name of the Companies (against the corresponding symbol) will be dragged from that google finance website a mentioned above.
    The sheet "List of Symbols" have nothing to do except to send the list of symbols to the Sheet "Main Worksheet". For that In the sheet "List of Symbols" there will remain a button "Copy" which will copy the total list of symbols to the 1st Column of "Main Worksheet".
    Attached Files Attached Files

  70. #70
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,839

    Re: What is the Problem in this Code to Pull Information from Google Finance

    Actually only he can deal this problem who has the expertise in grabbing data from Web.
    Yes, obviously ...

    I did say I couldn't help, but whoever does will need the file.

  71. #71
    Registered User
    Join Date
    05-05-2013
    Location
    Bhubaneswar, India
    MS-Off Ver
    Excel 2013
    Posts
    91

    Re: What is the Problem in this Code to Pull Information from Google Finance

    @Ali
    Thanks for your concern.
    May I request you to forward this problem to some suitable member whom you think having expertise in this domain. I hope as an Admin you know who is the best person to do this!!

  72. #72
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,839

    Re: What is the Problem in this Code to Pull Information from Google Finance

    Forward what? This is a public forum. Every member has access to this thread!!!

    You just need to be patient and wait for someone to come along who can help.

    I've put out a call for help in the Call in the Cavalry thread.
    Last edited by AliGW; 06-12-2018 at 01:38 PM.

  73. #73
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: What is the Problem in this Code to Pull Information from Google Finance

    For what it's worth. Here's my input on this matter.

    To avoid access denied issue. You will need to do 1 of following.

    1. Go to IE->Internet Options->Security->Custom Level->Miscellaneous. "Access data sources across domains" set it to Enable. And also, change http:// in the code to https://.

    2. As stated by others, use "serverxmlhttp"

    However, do note that Google finance heavily utilizes script to fill page and xml request will not be able to fetch result that you are after. 1 will return html source code with script to fetch data, but not the data itself. 2 will give you server side warning that you are not permitted to access the url using serverxmlhttp method.

    The code you are using, looks like it is at least several years old and Google has changed things since then.

    Your options are...
    1. Pilot IE through VBA and scrape info (note that this will be much slower than xmlhttp each iteration will take at least 5 sec).
    2. Find source other than Google that you can use to scrape the info.
    3. Pay for API access.
    Last edited by CK76; 06-12-2018 at 02:31 PM.
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  74. #74
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: What is the Problem in this Code to Pull Information from Google Finance

    Quote Originally Posted by CK76 View Post
    3. Pay for API access.
    Totally agree

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Auto Pull Google Finance
    By Scorpio in forum Excel General
    Replies: 0
    Last Post: 05-26-2016, 04:04 AM
  2. VBA Code to pull road direction data (especially toll booth) from google map
    By ariodan in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-16-2016, 07:48 AM
  3. ImportExternalData from Google Finance, according with sheet name
    By mrprofit in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-03-2014, 07:06 AM
  4. Using Selenium and Drop downs in Google Finance
    By JKlem in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-21-2014, 09:07 PM
  5. google spreadsheet need function/code to pull data from one sheet to another
    By venusrena in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 1
    Last Post: 04-27-2013, 04:48 AM
  6. Getting real time stock quotes from google finance / yahoo finance in excel
    By Navin Agrawal in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-21-2012, 12:41 PM
  7. Importing Data from Google Finance
    By uxohus2b in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-23-2007, 11:49 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1