Search a name with a combo boxe and return the associated row number

lcn

New Member
Joined
Dec 30, 2021
Messages
1
Office Version
  1. 2019
Platform
  1. Windows
Hello,

I use a form with a combo box to find out a name from a (long) list.

Column A contains NAMES
Column B contains first NAMES

Most of the time the search works fine when use enters few letters composing the searched name.
ie : if i look for Mr CLARCK Paul entering CL immediately highlights CLARK and all is done.

I do not know how to manage specifics cases when column A contains duplicates names,
ie : CLARK Paul and CLARK John

Here , column A has duplicates 'CLARK' but column hasn't.
In the case we are in name duplication, tying-in 'CL' will highlight the FIRST 'CLARK' from the list.
Then, the 2sd 'CLARK' can't be easyly found , here user has to manually browse all the list from the combobox to find it out.

Is there a way to manage duplicated in column A, would a second combobox for first names be usefull ?
Another important thing for me is to return the row number associated to the NAME selected in the combobox.

Here is attached my file :
COMBOBOX search.xlsm

Thanks for your help and have an happy end of year.
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Create another column on the worksheet that combines the first name and surname of the person.
Use this column to populate your ListBox
 
Upvote 0
Hi,
Creating a unique list of surnames (no duplicates) can be achieved when userform is intialized.
I would suggest that you replace your first name textbox and create a dependant combobox for first names
when the surname is selected, this creates a list in the first names combobox for user to select and at same time, you can create a list of each records row number.

I would also suggest, sorting the range prior to populating the comboboxes.

If I get an idle moment, I will unless another offers solution, have a play with your code & post result.

Dave
 
Upvote 0

Forum statistics

Threads
1,224,825
Messages
6,181,191
Members
453,021
Latest member
pingpong7117

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