Search duplicates, choose one in userform

BarefootPaul

Board Regular
Joined
Jul 21, 2011
Messages
54
I have been working on this for a bit on my own and trying to figure out the best way to approach it, but I am going in circles, so here goes.

I have a database of folks with some unique identifiers, but I want users to be able to search/lookup by last name, which obviously may not be unique. I also want them to be able to search by the unique identifiers, but I can do that with Vlookup no sweat.

Since I am trying to fully limit the end user's access to the worksheets, I have a userform. I would like the end user to be able to type part or all of a last name and then hit a search button. If the name is unique then I want to fill a few txtboxes on the form (I know how to do this), add some other information and then hit another button to find that record and add the new content to some cells to the right of that record.

If the name is not unique, I would like a listbox (is this the best way) to pop-up with all of the matching records so that the user can choose the correct one, which will then fill the txtboxes and append the new information to the correct record.

Does that make sense? I have looked at Index and Match, but am having trouble translating it to the userform.

I am using Excel 2010, with the ws name as Clients and the data in tblClients.

Thanks to all for feedback/direction.
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Thanks for this Paul would it be possible to get a copy of your Workbook? (less the data obviously) Just so i can have a look at your userform.

Regards
Chris
 
Upvote 0

Forum statistics

Threads
1,223,268
Messages
6,171,099
Members
452,379
Latest member
IainTru

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