# Microsoft Office Application Help - Excel Help forum > Excel Formulas & Functions >  >  How to have text hovering over a cell

## allstarcast

Hi there, 
I am looking for a way to have text hover over a cell when the mouse is moved on top of it. 

For example

cell 1 - 5 hours
cell 2 - $10,000

I would like to be able to hover over either cell and text appear saying (using formula)

"Cost Per Hour $2,000"

Is this something people have had been able to achieve successfully?

I have seen some VB script for doing this on charts - but not on cells.

There will be thousand of entries which is why I am not looking to use a cell comments box

Thanks

Rupert

----------


## allstarcast

If this seems impossible I could live with clicking into the cell to have the information appear?

Let me know what you think 

RJ

----------


## Domski

Only way I can think of easily achieving this would be to have a worksheet change event update the information held in a comment.

Dom

----------


## kvsrinivasamurthy

You can use this in worksheet_change event to display text, but only when you select the cell not 
when the mouse is moved on top of it. 





> Private Sub Worksheet_SelectionChange(ByVal Target As Range)
>     With Selection.Validation
>         .Delete
>         .Add Type:=xlValidateInputOnly, AlertStyle:=xlValidAlertStop, Operator _
>         :=xlBetween
>         .InputMessage = Target.Value
>         .IgnoreBlank = True
>         .InCellDropdown = True
>        .ShowInput = True
> ...

----------


## MarvinP

Hi,
You can use Comments to do what you want.  See the attached.

If not comments then what do you expect to see when you say "hover over"?

----------


## vlady

HEllo
MarvinP is right, just insert a comment then that is"hovering over" will display your message


Another one if you want to put some notes inside a formula you can use the N function




```
Please Login or Register  to view this content.
```


The N function has NO effect on the formula.

----------


## martindwilson

read here
http://excel.tips.net/T003374_Placin...a_Comment.html

----------


## allstarcast

> You can use this in worksheet_change event to display text, but only when you select the cell not 
> when the mouse is moved on top of it.



This is great, although I am having trouble working out where to put in the formula - i.e A1/B1 so I get the cost per hour in the hover box? I have the hover box working great, but it just shows the value of the cell I am in

Thanks

----------


## Domski

Hi,

How's this for you?




```
Please Login or Register  to view this content.
```



The code needs to go on the worksheets code page, right click on the sheet tab and select view code. Change rngCheckRange at the beginning to the range you want it to work on.

To initially set the comments on your table just copy and paste over the existing data table.

Dom

----------


## Camski

> You can use this in worksheet_change event to display text, but only when you select the cell not 
> when the mouse is moved on top of it.



I am getting a run-time error 1004: application-defined or object-defined error. Can you please help me? When I debug, it is highlighting the following:

.InputMessage = Target.Value

----------


## martindwilson

Unfortunately _your post does not comply with Rule 2 of our Forum_ RULES. *Do not post a question in the thread of another member -- start your own thread.* 

If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread. 

Old threads are often only monitored by the original participants.  New threads not only open you up to all possible participants again, they typically get faster response, too.

----------


## DHARUN KUMAR

Hi,

Can you explain it elaborately?

Thanks in advance!

----------

