Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Qn: Best way to search a database to match a last name??
Hello Everyone,
I have a array, database with names and addresses. It is located in a sheet by itself with each cell containing a list of information such as: A1: Last Name B1: First Name C1: Address D1: Phone number and so on. I have a userform that I created that lists these addresses one by one by using a Spinbutton. But, I have so many names in there, I think it would be better to put in a TextBox so that I can type in "part of the last name" OR "the last name", and then I click a search button and it will bring up the Name/Address/Phone No of that person. But, what is the best way to do that??? Would using the MATCH function be the best.. if so, could you give me an example of the VBA code for that. Isn't there some webpage that already has examples of searching a database and bring up the text displayed?? There has got to be somewhere somebody has already done this??? Thanks in advance.... mv |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Best way to search a database to match a last name??
Hi Michael,
Here is an example that brings up an InputBox and you type in the first letters of the lastname. http://www.mvps.org/dmcritchie/excel/event.htm#match using the value from the inputbox. Rows(Application.Match(val, Range("A2:A65536"), 1)).Offset(1, 0).Activate --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm "Michael Vaughan" wrote in message ... Hello Everyone, I have a array, database with names and addresses. It is located in a sheet by itself with each cell containing a list of information such as: A1: Last Name B1: First Name C1: Address D1: Phone number and so on. I have a userform that I created that lists these addresses one by one by using a Spinbutton. But, I have so many names in there, I think it would be better to put in a TextBox so that I can type in "part of the last name" OR "the last name", and then I click a search button and it will bring up the Name/Address/Phone No of that person. But, what is the best way to do that??? Would using the MATCH function be the best.. if so, could you give me an example of the VBA code for that. Isn't there some webpage that already has examples of searching a database and bring up the text displayed?? There has got to be somewhere somebody has already done this??? Thanks in advance.... mv |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
formula for database search - is it possible? | Excel Discussion (Misc queries) | |||
Search number within a database | Excel Worksheet Functions | |||
How do I allow visitors to do a keyword search of my database? | Excel Discussion (Misc queries) | |||
Database Search For Help? | Excel Discussion (Misc queries) | |||
Creating A Search Database..Need Help | Excel Discussion (Misc queries) |