+ Reply to Thread
Results 1 to 4 of 4

Web Query based off of URL in a cell

  1. #1
    Registered User
    Join Date
    07-07-2011
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    44

    Web Query based off of URL in a cell

    Hey guys I need to program a macro to run a web query based off of the url's in different cells
    ex.

    1 2
    A 100 URL1
    B 200 URL2
    C 300

    I want the query to run off of the url in cell A2 using variables this way I can loop through and run them for the rest of the cells?

    thanks!!

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Web Query based off of URL in a cell

    Record a macro of you running the query manually for one url, let the recording include any "copying" you do of that data in the query to other permanent locations, if appropriate. Then post the resulting code here (use code tags). Then we can assist you in converting that to a more dynamic tool that will run for multiple URLs. Be sure to explain what is supposed to happen between imports, what data is supposed to be recorded, and where.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    07-07-2011
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    44

    Re: Web Query based off of URL in a cell

    Please Login or Register  to view this content.
    That is the code for the manual run query. Now my problem is that I have a list of teams in cells A1,A2 and onward. So I am trying to tell the macro run the query based of the url in cell A1. this way once I have that I can create a loop and run it for all the teams. the destination of the macro is not important yet. I just need to know if and how the query can reference the cell and if i can have the cell value be a variable and use a variable? thanks alot!! let me know if i can be clearer.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Web Query based off of URL in a cell

    Assuming A1 = cowboys, A2 = ravens, A3 = patriots (etc), then run this:

    Please Login or Register  to view this content.

+ 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