Getting Value of the terms using excel macro

laxmananm

Board Regular
Joined
Mar 1, 2014
Messages
104
Hi ,

I have a 600+ terms in my excel sheet and each term has different description/Explanation. I have to create a macro that should retrieve /Display the description/Explanation when I click the specific term in the macro. I have a terms in the Alphabetical order. So if I Select A button it should retrieve only That terms alone.Like wise for till Z.Can anyone help me to build up the macro for the requirement.


Thanks in advance
 

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.
Thanks water..


Like, from A1 to A600 i have a terms.From B1 to B600 i have a description for Each.
Example: A2 have one term and B1 having the Expalnation for A1 term in excel.But i want to Listdown all the A Columns terms
in Dropdown.From that user if select one term it should display the the description of the same term which he selected.
But i need to hide all the Information in the First sheet,means the terms and descrptions should act as a data base.User get to
know the description for the terms through user form/Button selection.It should be fine if the dscription also display in the
Userform under the Dropdown which holds the terms.

Thanks
 
Upvote 0
This is some code for your Userform.
Userform Has:- "Combobox1" and "Testbox1" on it.
Place this code in the Userform Module.
Data Held In Sheet1 Columns "A & B".
Code:
Option Explicit
Dim Dic As Object
Private Sub ComboBox1_Change()
Me.TextBox1.Value = Dic(Me.ComboBox1.Value)
End Sub
Private Sub UserForm_Initialize()
Dim Rng As Range, Dn As Range, n As Long
With Sheets("Sheet1")
    Set Rng = .Range(.Range("A1"), .Range("A" & Rows.Count).End(xlUp))
End With
Set Dic = CreateObject("scripting.dictionary")
    Dic.CompareMode = vbTextCompare
For Each Dn In Rng: Dic(Dn.Value) = Dn.Offset(, 1).Value: Next
    With Me.ComboBox1
        .List = Application.Transpose(Dic.Keys)
        .ListIndex = 0
    End With
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,534
Messages
6,125,374
Members
449,221
Latest member
chriscavsib

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