+ Reply to Thread
Results 1 to 12 of 12

How to have text hovering over a cell

  1. #1
    Registered User
    Join Date
    11-24-2011
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    4

    How to have text hovering over a cell

    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

  2. #2
    Registered User
    Join Date
    11-24-2011
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: How to have text hovering over a cell

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

    Let me know what you think

    RJ

  3. #3
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: How to have text hovering over a cell

    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
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  4. #4
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: How to have text hovering over a cell

    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
    .ShowError = True
    End With
    End Sub

  5. #5
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: How to have text hovering over a cell

    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"?
    Attached Files Attached Files
    Last edited by MarvinP; 11-26-2011 at 01:18 AM.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  6. #6
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: How to have text hovering over a cell

    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.
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  7. #7
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: How to have text hovering over a cell

    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  8. #8
    Registered User
    Join Date
    11-24-2011
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: How to have text hovering over a cell

    Quote Originally Posted by kvsrinivasamurthy View Post
    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

  9. #9
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: How to have text hovering over a cell

    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

  10. #10
    Registered User
    Join Date
    08-21-2014
    Location
    Houston, TX
    MS-Off Ver
    MS Office 2010
    Posts
    1

    Re: How to have text hovering over a cell

    Quote Originally Posted by kvsrinivasamurthy View Post
    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

  11. #11
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: How to have text hovering over a cell

    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.

  12. #12
    Registered User
    Join Date
    09-20-2016
    Location
    Chennai, India
    MS-Off Ver
    10
    Posts
    28

    Re: How to have text hovering over a cell

    Hi,

    Can you explain it elaborately?

    Thanks in advance!

+ 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