+ Reply to Thread
Results 1 to 4 of 4

Limiting Number of Lookups for XML

  1. #1
    Registered User
    Join Date
    05-29-2012
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    31

    Unhappy Limiting Number of Lookups for XML

    Hello,
    I am actually using Googledocs for this one but I believe the answer is simple enough to transfer over.

    I am doing an importxml function which is as follows

    =INDEX(ImportXML(B$1,A$1),2)

    B1 = DrudgeReport.com
    A1 = //tt/b/a

    This returns the second result, as I matched the Index with the number 2 at the end. My questions is, how do I get results 2-5 to return?

    I have tried :
    =INDEX(ImportXML(B$1,A$1),2&5)
    =INDEX(ImportXML(B$1,A$1),2;5)
    =INDEX(ImportXML(B$1,A$1),2-5)

    Any ideas?

    I can get the results by inputing them one at a time as follows
    =INDEX(ImportXML(B$1,A$1),2)
    =INDEX(ImportXML(B$1,A$1),3)
    =INDEX(ImportXML(B$1,A$1),4)
    =INDEX(ImportXML(B$1,A$1),5)

    But I want it to do it in the same formula. Please help!
    Last edited by fansoffloyd; 06-06-2013 at 12:59 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    09-10-2012
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    929

    Re: Limiting Number of Lookups for XML

    I've never used Googledocs, but I'll give this a shot...

    So do you want the results in one column or multiple columns?

    If multiple columns, then what you have is the only way to do it... cells won't get "filled" up without a formula in them...

    If you want the results all in one cell, then use ampersands (&)... try this formula =INDEX(ImportXML(B$1,A$1),2)&INDEX(ImportXML(B$1,A$1),3)&INDEX(ImportXML(B$1,A$1),4)&INDEX(ImportXML(B$1,A$1),2)

  3. #3
    Registered User
    Join Date
    05-29-2012
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    31

    Re: Limiting Number of Lookups for XML

    Thank you so much for the reply. It is doing what you said it would but there is another way I need the info to line up:

    When I do =ImportXML(B$1,A$1)

    b1 = Drudgereport.com
    A1 = //tt/b/a

    It automatically populates straight down the row exactly the way I want it autopopulating seperate columns without having to add extra xmlimports. The only problem is it goes on for hundreds of entries all the way down to collumn 150. Do you know how to limit the returns of the xml import to the first 50 returns or the first 50 columns? I would just enter =INDEX(ImportXML(B$1,A$1),2 in each column one by one but googledocs limits you to only 50 xlm imports.

    Thank you so much for baring with me!!!
    Attached Images Attached Images

  4. #4
    Valued Forum Contributor
    Join Date
    09-10-2012
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    929

    Re: Limiting Number of Lookups for XML

    Sorry, my knowledge of googledocs have reached its limits... looking online seems to say that 50 is the limit... would it help if you break down your data 50 items at a time?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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