Function Problems

Create a Google Search Hyperlink from Text in an Excel Cell

Steve KSteve K Nov 12, 2026 868 views

Question details

Create a clickable Google search hyperlink from text entered in a worksheet while preserving that text as the visible cell label.

Create a Google Search Hyperlink from Text in an Excel Cell
Product
Microsoft Excel
Device & OS
not provided
Scenario
The user enters a search term such as "kittens" and wants it to display as a link that opens a Google search for that term.
Observed behavior
Conditional formatting cannot create hyperlinks or change a cell's stored value; a formula in another cell or a VBA event is needed.
Before you start

Choose whether the typed search term can remain in an input cell and the clickable result can appear in another cell. If the same input cell must become a hyperlink after entry, save the workbook as a macro-enabled .xlsm file and enable macros.

Solution 1Recommended

Use a separate cell with the HYPERLINK formula

Use this simplest method when the search term can be entered in one cell and the clickable link can appear in another cell.

Conditional formatting can change a cell's appearance, but it cannot create a hyperlink or replace the cell value. A formula in a separate display cell can keep the entered text as the link label and use it in the Google search URL.

1
Enter the search term

Type the search term in cell H38, such as kittens.

2
Select the display cell

Click the cell where you want the clickable result to appear, such as I38.

3
Enter the hyperlink formula

Type =IF(H38<>"",HYPERLINK("https://www.google.com/search?q="&ENCODEURL(H38),H38),"") and press Enter. The result cell displays the text from H38 and opens its Google search when clicked.

4
Use a basic formula if ENCODEURL is unavailable

If your Excel version does not support ENCODEURL, use =IF(H38<>"",HYPERLINK("https://www.google.com/search?q="&H38,H38),""). This works best with simple search terms; ENCODEURL handles spaces and special characters more reliably.

Use a separate cell with the HYPERLINK formula
Clickable search text created: When H38 contains text, the formula cell shows the same text as a clickable Google search link. When H38 is blank, the formula cell remains blank.
WPS Spreadsheets

Create clickable Google search links with WPS Spreadsheets

WPS Spreadsheets can create a clickable search link from text in an input cell with the HYPERLINK formula. Keep the term in one cell and use a formula in a nearby cell to display the same text as a Google search link.

  1. 1. Enter a search term: In WPS Spreadsheets, type the search term in an input cell, such as H38.
  2. 2. Choose an output cell: Click a nearby empty cell, such as I38, where the clickable text should appear.
  3. 3. Insert the hyperlink formula: Enter =IF(H38<>"",HYPERLINK("https://www.google.com/search?q="&ENCODEURL(H38),H38),"") and press Enter.
  4. 4. Open the search result: Click the linked text in the output cell to open the matching Google search in your default browser.
Create Google search hyperlinks from worksheet text with HYPERLINK formulas.Keep the original entered text as the visible clickable label.Use familiar spreadsheet formulas and cell references.Open and save Microsoft Excel .xlsx and .xls files with format compatibility.
microsoft office alternative - wps office

Frequently Asked Questions

Can conditional formatting make text into a hyperlink in Excel?

No. Conditional formatting only changes formatting based on rules; it cannot create a hyperlink or alter the stored cell value. Use the HYPERLINK function in another cell or use VBA for same-cell automation.

How do I show the search term instead of the full Google URL?

Use the second argument of HYPERLINK as the display text. For example, HYPERLINK("https://www.google.com/search?q="&ENCODEURL(H38),H38) shows the value from H38 rather than the URL.

Why should I use ENCODEURL in a Google search hyperlink?

ENCODEURL converts spaces and special characters in the entered text into URL-safe characters. This helps searches such as "cute kittens" or text containing punctuation open correctly.

Can I make the cell I type into become a hyperlink automatically?

Not with a normal worksheet formula, because a formula cannot overwrite the value in its own cell. Use a Worksheet_Change VBA macro if the original input cell must become the link.

What happens when the input cell is blank?

With the IF formula, the hyperlink display cell returns an empty string and shows no clickable text until a search term is entered.