Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Search Results to Listbox
Please Help if you can
Column A has last name, first name Say these names are in Column A Column A Row Hoover, John 6 Hoover, Rick 10 Hoover, Jordan 20 Does the Search, all 3 should come up in the list box/ComboBox/ Dropdown Wichever is easiest, When i select Rick, It should select Rown 10 Column A Then get the Data From Row B10 D10, and F10 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Search Results to Listbox
It would make things a lot easier if you put the last name in one column and
the first name in another. Although, it can be done with it as it is, the code is a lot less complicated if the two elements are separated. " wrote: Please Help if you can Column A has last name, first name Say these names are in Column A Column A Row Hoover, John 6 Hoover, Rick 10 Hoover, Jordan 20 Does the Search, all 3 should come up in the list box/ComboBox/ Dropdown Wichever is easiest, When i select Rick, It should select Rown 10 Column A Then get the Data From Row B10 D10, and F10 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Search Results to Listbox
After reading this again, it really is not necessart to separate them. I had
read it that you wanted to search for the name with "Rick", but you want to select from a list box or combo box. 1. Use column A to load the list or combo box. 2. In the click event of the control, use the Find method to search Range A2 through the last row with data. 3. When found, use the offset method to capture the cells B, D and F on the same row into a variable. 4. Use the variable to do whatever you need to do with the data. " wrote: Please Help if you can Column A has last name, first name Say these names are in Column A Column A Row Hoover, John 6 Hoover, Rick 10 Hoover, Jordan 20 Does the Search, all 3 should come up in the list box/ComboBox/ Dropdown Wichever is easiest, When i select Rick, It should select Rown 10 Column A Then get the Data From Row B10 D10, and F10 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Search Results to Listbox
On Oct 24, 5:15 am, JLGWhiz wrote:
After reading this again, it really is not necessart to separate them. I had read it that you wanted to search for the name with "Rick", but you want to select from a list box or combo box. 1. Use column A to load the list or combo box. 2. In the click event of the control, use the Find method to search Range A2 through the last row with data. 3. When found, use the offset method to capture the cells B, D and F on the same row into a variable. 4. Use the variable to do whatever you need to do with the data. " wrote: Please Help if you can Column A has last name, first name Say these names are in Column A Column A Row Hoover, John 6 Hoover, Rick 10 Hoover, Jordan 20 Does the Search, all 3 should come up in the list box/ComboBox/ Dropdown Wichever is easiest, When i select Rick, It should select Rown 10 Column A Then get the Data From Row B10 D10, and F10- Hide quoted text - - Show quoted text - Hi I will do it the foloowing way. 1) Define a range in module like this Public rng_Levels As Range 2) Initialise it in "This Workbook" the following way.. edit the worksheet to urs. Private Sub Workbook_Open() With ThisWorkbook.Worksheets("Levels") Set rng_Levels = .Range("A2:B20") End With End Sub 3) Add the items to a listbox (named Listbox1) n_Col = 1 n_Row = 2 Do While rng_Levels(n_Row, n_Col).Value < "" Listbox1.additem rng_Levels(n_Row, n_Col).Value n_Row = n_Row + 1 Loop once it is selected, write to a specific cell and use VLookup to retieve its correcponding data. Try it.. HTH Joe |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copying Named Ranges based on ListBox Results | Excel Programming | |||
VBA code to search and display results in multicolumn listbox | Excel Programming | |||
Search Spreadsheet - Results in either listbox or new spreadsheet | Excel Programming | |||
I cant do a search on this forum. Everytime I search, it comes up with zero results | Excel Programming | |||
Sorting ListBox results or transposing ListBox values to other cells for sorting | Excel Programming |