Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 691
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
formula for database search - is it possible? sos-DC[_2_] Excel Discussion (Misc queries) 7 July 11th 08 08:14 PM
Search number within a database Montu Excel Worksheet Functions 2 December 7th 07 02:08 PM
How do I allow visitors to do a keyword search of my database? Ralph Jarzombek Excel Discussion (Misc queries) 0 March 15th 06 11:56 PM
Database Search For Help? Rumish8086 Excel Discussion (Misc queries) 12 January 11th 06 09:00 PM
Creating A Search Database..Need Help ajaffer Excel Discussion (Misc queries) 6 December 3rd 05 09:50 PM


All times are GMT +1. The time now is 09:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"