ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VLOOKUP with mouseover? (https://www.excelbanter.com/excel-programming/335918-vlookup-mouseover.html)

Cheese

VLOOKUP with mouseover?
 
Is there any way to perform the equivalent of a VLOOKUP so that a simple
mouseover (or click) of a cell displays the data in a pop-up like format?

The mainframe data at my work abbreviates everything, so unless you can
remember thousands and thousands of definitions, you have to provide them in
the spreadsheet somehow. Right now I have 12-15 columns of data. If I added
new columns alongside what I already have for the purpose of definitions,
that's at least 25 columns total, which I cannot possibly view on one (or
even two or three) screens at one time.

It would be great to instantly see the data by a mouseover, click, keyboard
stroke sequence, or something similar.

Any ideas?

Tim Williams

VLOOKUP with mouseover?
 
Would adding the definitions as cell comments be acceptable?

Tim

--
Tim Williams
Palo Alto, CA


"Cheese" wrote in message
...
Is there any way to perform the equivalent of a VLOOKUP so that a simple
mouseover (or click) of a cell displays the data in a pop-up like format?

The mainframe data at my work abbreviates everything, so unless you can
remember thousands and thousands of definitions, you have to provide them

in
the spreadsheet somehow. Right now I have 12-15 columns of data. If I

added
new columns alongside what I already have for the purpose of definitions,
that's at least 25 columns total, which I cannot possibly view on one (or
even two or three) screens at one time.

It would be great to instantly see the data by a mouseover, click,

keyboard
stroke sequence, or something similar.

Any ideas?




Cheese

VLOOKUP with mouseover?
 
Would adding the definitions as cell comments be acceptable?

Tim


Sure, can this be done automatically?

William Benson[_2_]

VLOOKUP with mouseover?
 
I have accomplished it this way:

1) I insert a new command called "LookUpDefinition" with the user
right-clicks the cell.
2) The definition appears in a message box.

It requires a global variable to hold the cell being looked up because I
found I had to call a macro not in the same code module as the worksheet,
and could not pass it an argument either:

Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, _
Cancel As Boolean)
Dim obj As Object
Set TheCell = Target
For Each obj In Application.CommandBars("cell").Controls
'''''''''''Tag helps you know what to delete later
If obj.Tag = "HereIsYourItem" Then obj.Delete
Next obj
''''''''''''I named the range you can rt-click to
''''''''''''trigger this DataElements
If Not Application.Intersect(Target, Range("DataElements")) _
Is Nothing Then
With Application.CommandBars("cell").Controls _
.Add(Type:=msoControlButton, befo=6, _
temporary:=True)
.Caption = "See The Definition" '''''''''''I named the
shortcut menu item this
.OnAction = "HereIsYourMacro" ''''''''''''''''''this doesn't
seen to be able to accept arguments
''''''''''' it would not call a subprocedure from within
''''''''''' the worksheet's code module
'''''''''''''also doesn't seem to take arguments which is why I said
''''''''''''' you should set a global variable

'''''''''''Tag helps you know what to delete later
.Tag = "HereIsYourItem"
End With
End If
End Sub



'''In a separate module:
Option Explicit
Public TheCell As Range

Sub HereIsYourMacro()
MsgBox Evaluate("=VLOOKUP(""" & TheCell.Value & """,LookupRange,2)")

End Sub




"Cheese" wrote in message
...
Is there any way to perform the equivalent of a VLOOKUP so that a simple
mouseover (or click) of a cell displays the data in a pop-up like format?

The mainframe data at my work abbreviates everything, so unless you can
remember thousands and thousands of definitions, you have to provide them
in
the spreadsheet somehow. Right now I have 12-15 columns of data. If I
added
new columns alongside what I already have for the purpose of definitions,
that's at least 25 columns total, which I cannot possibly view on one (or
even two or three) screens at one time.

It would be great to instantly see the data by a mouseover, click,
keyboard
stroke sequence, or something similar.

Any ideas?




William Benson[_2_]

VLOOKUP with mouseover?
 
Here is the code without all the awful comments that seem to be wrapping
around:. Also, I lied, the caption was not "LookUpDefinition", it was "See
The Definition"

Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, _
Cancel As Boolean)
Dim obj As Object
Set TheCell = Target
For Each obj In Application.CommandBars("cell").Controls
If obj.Tag = "HereIsYourItem" Then obj.Delete
Next obj
If Not Application.Intersect(Target, Range("DataElements")) _
Is Nothing Then
With Application.CommandBars("cell").Controls _
.Add(Type:=msoControlButton, befo=6, _
temporary:=True)
.Caption = "See The Definition"
.OnAction = "HereIsYourMacro"
.Tag = "HereIsYourItem"
End With
End If
End Sub


'In the separate module:

Option Explicit
Public TheCell As Range

Sub HereIsYourMacro()
MsgBox Evaluate("=VLOOKUP(""" & TheCell.Value & """,LookupRange,2)")

End Sub


"William Benson" wrote in message
...
I have accomplished it this way:

1) I insert a new command called "LookUpDefinition" with the user
right-clicks the cell.
2) The definition appears in a message box.

It requires a global variable to hold the cell being looked up because I
found I had to call a macro not in the same code module as the worksheet,
and could not pass it an argument either:

Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, _
Cancel As Boolean)
Dim obj As Object
Set TheCell = Target
For Each obj In Application.CommandBars("cell").Controls
'''''''''''Tag helps you know what to delete later
If obj.Tag = "HereIsYourItem" Then obj.Delete
Next obj
''''''''''''I named the range you can rt-click to
''''''''''''trigger this DataElements
If Not Application.Intersect(Target, Range("DataElements")) _
Is Nothing Then
With Application.CommandBars("cell").Controls _
.Add(Type:=msoControlButton, befo=6, _
temporary:=True)
.Caption = "See The Definition" '''''''''''I named the
shortcut menu item this
.OnAction = "HereIsYourMacro" ''''''''''''''''''this doesn't
seen to be able to accept arguments
''''''''''' it would not call a subprocedure from within
''''''''''' the worksheet's code module
'''''''''''''also doesn't seem to take arguments which is why I
said
''''''''''''' you should set a global variable

'''''''''''Tag helps you know what to delete later
.Tag = "HereIsYourItem"
End With
End If
End Sub



'''In a separate module:
Option Explicit
Public TheCell As Range

Sub HereIsYourMacro()
MsgBox Evaluate("=VLOOKUP(""" & TheCell.Value & """,LookupRange,2)")

End Sub




"Cheese" wrote in message
...
Is there any way to perform the equivalent of a VLOOKUP so that a simple
mouseover (or click) of a cell displays the data in a pop-up like format?

The mainframe data at my work abbreviates everything, so unless you can
remember thousands and thousands of definitions, you have to provide them
in
the spreadsheet somehow. Right now I have 12-15 columns of data. If I
added
new columns alongside what I already have for the purpose of definitions,
that's at least 25 columns total, which I cannot possibly view on one (or
even two or three) screens at one time.

It would be great to instantly see the data by a mouseover, click,
keyboard
stroke sequence, or something similar.

Any ideas?







All times are GMT +1. The time now is 04:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com