Hover over cell with dropdownlist

Rudiji

New Member
Joined
Sep 5, 2021
Messages
4
Office Version
  1. 2010
Platform
  1. Windows
I searched but could not find a solution so here is my problem.

In sheet1 I have 2 columns with dropdownlist containing the names found in sheet2 column A.
I can choose 2 names each row to play against each other.
In sheet2 there are 2 other columns G and H which contain numbers eg. 35 and 16 which are connected to the name in the same row at column A.
What I want to do is when I pick a name in sheet1 and at any time hover over the name, it should do a HLOOKUP for that name in sheet2, find the numbers in that row and
open a small box with the message "OB: 35 3D: 16" as in the example above.
It should be hover over and not select the cell as there will always be one selected.

I hope this is clear as English is not my language.

Regards and thanks in advance,
Rudi
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Welcome to the MrExcel board!

Try this with a copy of your workbook. To implement ..
1. Right click the Sheet1 name tab and choose "View Code".
2. Copy and Paste the code below into the main right hand pane that opens at step 1.
3. Close the Visual Basic window & test.
4. Your workbook will need to be saved as a macro-enabled workbook (*.xlsm).

VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
  Dim rFound As Range
  
  If Not Intersect(Target, Columns("A:B")) Is Nothing And Target.CountLarge = 1 Then
    With Target
      .ClearComments
      If Len(.Value) > 0 Then
        Set rFound = Sheets("Sheet2").Columns("A").Find(What:=.Value, LookAt:=xlWhole)
        If Not rFound Is Nothing Then
          .AddComment
          .Comment.Text Text:="OB: " & rFound.Offset(, 6).Value & " 3D: " & rFound.Offset(, 7).Value
          .Comment.Shape.TextFrame.AutoSize = True
        End If
      End If
    End With
  End If
End Sub
 
Upvote 0
Solution
Thank you so much Peter, this is exactly what I need.
Works perfect, you're the best.

Rudi
 
Upvote 0
You're welcome. Thanks for the follow-up. :)
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top