Google sheets hover text to show tooltip

Google sheets hover text to show tooltip


In this tutorial, you will learn about google sheets hover text methods and how to show tooltip text on hover. Above is one example of showing hover text.

When working with a lot of data in google sheets, you need different visualisation abilities to make the sheet readable and presentable.

One of such needs is to show a tooltip when you hover text in google sheets cells.

In this tutorial, I will show you 3 ways to make this happen. Let’s jump in.

Table of content:

You can set a tooltip if you are doing data validation in a cell. But google sheets do not have a direct way to show tooltips for a cell without the cell having validations set. 

Let’s explore how to achieve this using a few workarounds. 

Google sheets hover text to show tooltip using Notes:

Let’s consider using the notes feature in google sheets to achieve this. Notes in google sheets appear when you hover your mouse over a specific cell in a spreadsheet. You can add notes manually to a cell by selecting the cell and clicking on the right-click on your mouse and then selecting insert notes. You can also do it programmatically using a few lines of script.

Here is how to show the tooltip on hover:

1. Open a new sheet in google sheets on your computer

2. Highlight the cell you want to show the tooltip for

3. From the main navigation menu, click on Insert and choose Note


4. This will bring up a white box next to the cell


5. Enter the hover text that you want to show as a tooltip


6. Click outside of the notes area to hide the notes box

Now when you hover your mouse on this cell, a tooltip will pop up and it will show your hover text.

You can do this same using dynamic notes. You can set the hover text automatically.

Show value of the cell as tooltip text automatically

In this previous example, you saw how you can manually set notes for every cell.

If you have to do this for 10s or 100s of cells, then it will be a challenge. To do this automatically, you have to use the below formula:

Formula:


function myFunction() {
	var ss = SpreadsheetApp.getActiveSpreadsheet();
	var sheet = ss.getSheets()[0];
	var targetCell = sheet.getRange("A3");
	var noteText = targetCell.getValue();
	targetCell.setNote(noteText);
}

myFunction();

Here is how to use this formula on your sheet.

1. Open google sheets on your computer

2. Select the cell where you want to show the tooltip

3. From the top menu, click on Extensions > App script

4. This will bring up the app script window

5. Copy and paste this formula onto the code editor


6. Click on Save and then Run

If it asks for permission, follow the below steps:

Now you can see the tooltip when you hover on the cell.

Automatically pick up cell value from other cell and show as a tooltip

You learned how to show tooltip text using the same cell value.

What if you want to show the tooltip text using another cell in the same sheet or a different sheet.

You can use the below formula to achieve this.

function myFunction() {
	
	var ss = SpreadsheetApp.getActiveSpreadsheet();
	var sheet = ss.getSheets()[0];
	var targetCell = "";
	var range="";
	var sourceCell = sheet.getRange('C1:C10').getValues();
	
	for (var i=1; i<sourceCell.length; i++){
		range = "A" + i;
		targetCell = sheet.getRange(range);
		targetCell.setNote(sourceCell[i-1]);
	}
}

myFunction();


Follow the steps shown previously to run this formula using the app script. Remember to remove the old formula if any present before deploying this.

Google sheets cell tooltip using comments:

The second method to show the tooltip when you hover on a cell is using the inbuilt comments in google sheets.

Here is how to do this:

1. Open google sheets and highlight the cell where you want to show tooltips

2. Click on the Insert button from the navigation menu and select the Comment option

The shortcut for PC is Ctrl + Alt + M and for Mac it is Cmd + Option + M.

3. A comment box will appear where you can write any text you want

4. Press the Comment button and now when you hover over the cell, you can see a tooltip with the text you had added

Here multiple users of the sheet can add comments as per sheet permission. All the comments will be shown inside the tooltip.

In this method, along with the text, the name of the author will appear. In case multiple people are using the same sheet, their names and pictures will appear.

Note that this is a manual method and you should do it when dealing with a few cells.

When you use any web links inside a cell in google sheets, it automatically shows the tooltip text once you hover over the cell.

Here is how it looks.

By default, the link will show the Page title and meta description in the tooltip.

We can use this method to link to a range of cells or individual cells to show the hover text. Here is how:

1. Open google sheets and select the cell where you want to show the tooltip

2. Click on Insert from the main menu and select the Insert link option

You can press Ctrl + K on your PC or Cmd + K on your Mac to insert a link as well.

3. Once the link editor opens up, select “Sheets and named ranges”

4. Now click on the “Select range of cells to link” option


5. This will open a dialog box and an input field to enter the cell ranges


6. You can simply select the cell range or individual cells from any sheet in your spreadsheet.


7. Now this will add a tooltip when you hover on the cell and it will show the text from the selected cell


This is how you can show tooltips when someone hovers over a cell in google sheets.

FAQ

How do you make a tooltip in google sheets?

There are several ways to create tooltips in google sheets. You can do this by using Notes, custom scripts, comment boxes, and hyperlinks.

How do I create a hover note in google sheets?

You can insert a note using the shortcut Shift + F2 on a PC or Mac. You can write any texts on the note to show them as a tooltip when you hover on the cell.

Key takeaways and wrapping up


In this tutorial, you learned about google sheets hover text workarounds. You saw how we can show tooltips in google sheets using the insert note method, custom app script method, using comments, and hyperlinks.

These methods come in handy when working with a large datasheet. So go and try this in your next project.

Appendix

[1] Hyperlinks in google sheets – Link

Further Reading

New to google sheets ? Start here

Learn Enter & Format data in google sheets:

Enter & Find
Format Data
Layout
Customize

30+ smart tools to supercharge your sheets