View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
[email protected] gwoodby@gmail.com is offline
external usenet poster
 
Posts: 58
Default Search with multiple results on different lines same column

On Oct 23, 3:14 pm, dan dungan wrote:
I'm not clear how the name format forces you to need a listbox or
combobox.

Is the last name, first name format in one column?

Would it be useful to parse the name to two columns and name them
first name and last name?

Dan Dungan





The format for the names is last then first,
so i need the listbox or combo box to house the names, then when i
select the name it will load the data in the cells to the right, the
names have to stay in alphabetical order. i have 6 different forms so
its kind of a complicated situation this is the only part im having
trouble with. :(- Hide quoted text -


- Show quoted text -


I could do it in some sort of drop down box, the form can only be
modified from the user forms, so i cant use the
Data|Filter|autofilter to column A due partially because some of
the people whom have access to it could change things that dont need
to be changed. As for the Splitting the columns i Could do that but
then i would have to modfiy the still growing 14 pages of code :| so
im trying to figure out the easiest way to do this. I was using

Dim r As Range
Dim ws As Worksheet
Dim SearchTxt As String
Set ws = Worksheets("sheet1")
SearchTxt = TxtCaseName.Text
Set r = ws.Cells.Find(What:=SearchTxt, After:=ws.Range("A1"), _
LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False)

to search, but how would i make it to where I could Post the Results
into a listbox or combo box, or some kind of drop down menu and then
when you choose the selection ( the specific name you wanted) That it
will pull up the data on the same row column b, d, f etc
im thinking maybe declare a variable store them there and
use .additem?