+ Reply to Thread
Results 1 to 4 of 4

Creating Simple Excel Search Query

  1. #1
    Registered User
    Join Date
    08-26-2009
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    53

    Creating Simple Excel Search Query

    I'm in the process of creating what I thought should be an easy excel search query, but I seem to be having a bit of trouble with the programming language.

    To make it simple:

    I want to be able to have a list of search terms in excel in the first column of my spreadsheet (A1, A2, A3, etc), and then in the second column (b1, b2, b3), have correlating links to a Google search for those terms.

    Just a quick illustration...

    A ________________________B_______________________________________________
    1. poker __________________1. http://www.google.com/search?q=poker
    2. 2plus2__________________2. http://www.google.com/search?q=2plus2
    3. ny giants________________3. http://www.google.com/search?q=ny giants
    4. pokerstars_______________4. http://www.google.com/search?q=pokerstars
    5. family guy_______________5. http://www.google.com/search?q=family guy


    My issue is that I can't figure out what to put in after "search?q=***" as the *** to direct excel to read the A column. I've tried =google.com/search?q="A1"
    =google.com/search?q=A1
    =google.com/search?q=[A1]
    google.com/search?q=A1

    None of these have worked. Thanks for the help in advance.

  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: Creating Simple Excel Search Query

    In B1 put this formula and copy down:

    =HYPERLINK("http://www.google.com/search?q=" & A1)
    _________________
    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
    08-26-2009
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    53

    Re: Creating Simple Excel Search Query

    Awesome. Thanks so much.

    And just to add to that. If there are actually 2 parameters in the query-

    For example, http://www.google.com/search?q=poker&y=LasVegas , where Poker was the first parameter, and Las Vegas was the second parameter (location)

    If Poker was A1, and Las Vegas B1, what would I write in C1 to refer the cell to the previous 2.
    Last edited by stevedes7; 08-26-2009 at 08:41 AM.

  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: Creating Simple Excel Search Query

    Well, the answer to your formatting question is:

    =HYPERLINK("http://www.google.com/search?q=" & A1 & "&y=" & B1

    That creates a link to match your layout, but Google doesn't respond properly when I do that. To get both terms to work in a search I did this:

    =HYPERLINK("http://www.google.com/search?q=" & A1 & "+" & B1)

+ 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