Create a Google Search Hyperlink from Text in an Excel Cell
Question details
Create a clickable Google search hyperlink from text entered in a worksheet while preserving that text as the visible cell label.

- 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.
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.
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.
Type the search term in cell H38, such as kittens.
Click the cell where you want the clickable result to appear, such as I38.
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.
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 VBA Worksheet_Change macro for the original input cell
Use this method only when the same cell where text is typed must be converted into a hyperlink after the user enters it.
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. Enter a search term: In WPS Spreadsheets, type the search term in an input cell, such as H38.
- 2. Choose an output cell: Click a nearby empty cell, such as I38, where the clickable text should appear.
- 3. Insert the hyperlink formula: Enter =IF(H38<>"",HYPERLINK("https://www.google.com/search?q="&ENCODEURL(H38),H38),"") and press Enter.
- 4. Open the search result: Click the linked text in the output cell to open the matching Google search in your default browser.

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.




