+ Reply to Thread
Results 1 to 22 of 22

extract from web

  1. #1
    Forum Contributor
    Join Date
    04-06-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    193

    Unhappy extract from web

    is it possible to extract the Doctor's Office, Phone Number of all doctors from http://www.suggestadoctor.com/doctor...ma_urology.htm in a new sheet?

    OR

    if i provide the link address of each doctors in a sheet can i exctract the Doctor's Office, Phone Numbers

    means
    sheet1 have the following urls
    http://www.suggestadoctor.com/doctor...hammontree.htm
    http://www.suggestadoctor.com/doctor...s_kolettis.htm
    http://www.suggestadoctor.com/doctor...dwin_moody.htm
    etc

    is it possible to extract the above mentioned items?

    result want in sheet2
    A1= url
    B1= Doctor's Office
    C1= Phone Number

    any one can help me??

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: extract from web

    This can be used as an array formula, so assuming the url is in A1, highlight cells B1,C1 and D1 Enter the below formula and hit control + alt + Enter

    PHP Code: 
    =GetDrDetails(A1
    Then Drag it down

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    04-06-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    193

    Re: extract from web

    sorry Kyle123 sir
    i am new in vba can u explain details
    first i enter the three url in a1 cell
    then i select BCD
    then i enter the equation at the equation bar unfortunately i get a #NAME? error in B1 cell

    i copy ur function details and placed it in vba module1
    but nothing happend

    so can u explain some more detail

  4. #4
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: extract from web

    Copy the Excel VBA code
    Select the workbook in which you want to store the Excel VBA code
    Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
    Choose Insert | Module
    Where the cursor is flashing, choose Edit | Paste

    With 1 url in A1, select cells B1,C1 and D1

    Click the address bar and type:
    PHP Code: 
    =GetDrDetails(A1
    Press Control + Alt + Enter

  5. #5
    Forum Contributor
    Join Date
    04-06-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    193

    Re: extract from web

    as per ur instruction i do everything but after entering the =GetDrDetails(A1) i get an error report
    compile error:
    wrong number of arguments or invalid property assignment

    pls review sir
    vData(1) = split(split(.responsetext, "title>")(1)
    error shows at after = split

  6. #6
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: extract from web

    That isn't the code I posted

  7. #7
    Forum Contributor
    Join Date
    04-06-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    193

    Re: extract from web

    You are sending the following code
    Please Login or Register  to view this content.
    from this the error shows at the below part
    vData(1) = split(split(.responsetext, "title>")(1), " -")(0)
    please review
    Last edited by anilg0001; 04-27-2013 at 01:52 AM.

  8. #8
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: extract from web

    1. Please use code tags when posting code.
    2. What url are you using? It works fine for the urls you listed above:
    http://www.suggestadoctor.com/doctor...hammontree.htm
    http://www.suggestadoctor.com/doctor...s_kolettis.htm
    http://www.suggestadoctor.com/doctor...dwin_moody.htm

  9. #9
    Forum Contributor
    Join Date
    04-06-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    193

    Re: extract from web

    i am using the same 3 urls
    but did not get the result
    can u send me that sample file to me to review, Please.

  10. #10
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: extract from web

    see attached
    Attached Files Attached Files

  11. #11
    Forum Contributor
    Join Date
    04-06-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    193

    Re: extract from web

    This is very easist way to extract
    could u please help some more because when i trying ur attached file i get only range B value and not get other two fields
    i thought it is a simple misunderstanding of mine.

  12. #12
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: extract from web

    Have you followed the instructions about entering the array formula?

  13. #13
    Forum Contributor
    Join Date
    04-06-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    193

    Re: extract from web

    yes sir
    it get corrected when the excel sheet saved as binery workbook

  14. #14
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: extract from web

    Anil,

    Your post 7 does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code in [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  15. #15
    Forum Contributor
    Join Date
    04-06-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    193

    Re: extract from web

    if u dont mind i am notable to findout the " # icon at the top of your post window."
    could u help me


    also i like to study more about mr kyle123 code
    how it possible?

    because i need to extract other sites also
    the fields are different
    expecting ur opinion

    IS he extracted based on pagesouce??

  16. #16
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: extract from web

    You will see the Quick Reply post window where you type your replies. At the top of the box, you will see the # symbol.

    You can post back your question to Kyle on this thread. For that you need to unmark it as solved.

  17. #17
    Forum Contributor
    Join Date
    04-06-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    193

    Re: extract from web

    Is it possible to collect some more details
    Fax # :
    Gender
    Medical School
    Graduation Year
    Languages

  18. #18
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: extract from web

    I have marked the thread as "unsolved" for you. Please put the code tags in post 7.

  19. #19
    Forum Contributor
    Join Date
    04-06-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    193

    Re: extract from web

    YES I GOT IT THANK U
    ARLU

    What i need to do next step to get the answer to the post 17?

    i send a msg to kyle but no reply

  20. #20
    Forum Contributor
    Join Date
    04-06-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    193

    Re: extract from web

    mr Arul123
    what i need to do next?

  21. #21
    Forum Contributor
    Join Date
    04-06-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    193

    Lightbulb Re: extract from web

    Please Login or Register  to view this content.
    The above codes are written by Mr.Kyle123
    i need the following fields also
    Dr. Name
    Doctor's Hospital
    Doctor's Office
    Phone Number
    Fax Number
    Gender
    Graduation Year
    Location


    For getting the gender value i change his code to the below mentioned codes but i did not get the answer
    how can i correct it?
    Please help



    Please Login or Register  to view this content.

  22. #22
    Forum Contributor
    Join Date
    04-06-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    193

    Re: extract from web

    any help to move front?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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