+ Reply to Thread
Results 1 to 5 of 5

VLOOKUP with mouseover?

  1. #1
    Cheese
    Guest

    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?

  2. #2
    Tim Williams
    Guest

    Re: VLOOKUP with mouseover?

    Would adding the definitions as cell comments be acceptable?

    Tim

    --
    Tim Williams
    Palo Alto, CA


    "Cheese" <[email protected]> wrote in message
    news:[email protected]...
    > 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?




  3. #3
    Cheese
    Guest

    Re: VLOOKUP with mouseover?

    > Would adding the definitions as cell comments be acceptable?
    >
    > Tim


    Sure, can this be done automatically?

  4. #4
    William Benson
    Guest

    Re: 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, before:=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" <[email protected]> wrote in message
    news:[email protected]...
    > 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?




  5. #5
    William Benson
    Guest

    Re: 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, before:=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" <wbenson1(SPAMSUCKS)@nycap.rr.com> wrote in message
    news:[email protected]...
    >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, before:=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" <[email protected]> wrote in message
    > news:[email protected]...
    >> 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?

    >
    >




+ 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