Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Searching a database in excel


I have attached a simple database search for excel. What it does is
searches a list of questions and answers in Sheet2 and returns matching
results in a listbox in a userform.

It works fine, however I'd like to change it to do the following:
instead of only being able to searhc the question, I'd like it to
search both the question and the answer, but still only return the
question in listbox 1 and the answer in textbox2.

Here's an example:

If the data is as follows (in Sheet 2, different columns):

Q: Who is playing in the NBA finals?

A: The Detroit Pistons and the San Antonio Spurs.

I'd like search querys entered such as: NBA, NBA Finals, Detroit
Pistons, Spurs, etc. all to return just "Who is playing in the NBA
finals" under search results, upon clicking they will recieve the
answer under "answer". I'm trying to allow cusomters to search for any
topic/phrase, and few FAQ's on them.. May sound confusing, but it's
probably a simple range modification, I just can't figure it
out...thanks and I appreciate it!


+-------------------------------------------------------------------+
|Filename: simple search form.ZIP |
|Download: http://www.excelforum.com/attachment.php?postid=3470 |
+-------------------------------------------------------------------+

--
kylev96
------------------------------------------------------------------------
kylev96's Profile: http://www.excelforum.com/member.php...o&userid=23983
View this thread: http://www.excelforum.com/showthread...hreadid=377810

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 692
Default Searching a database in excel

Search the archives for "Find". There have been many replies on using this
is VBA.

--
steveB

Remove "AYN" from email to respond
"kylev96" wrote in
message ...

I have attached a simple database search for excel. What it does is
searches a list of questions and answers in Sheet2 and returns matching
results in a listbox in a userform.

It works fine, however I'd like to change it to do the following:
instead of only being able to searhc the question, I'd like it to
search both the question and the answer, but still only return the
question in listbox 1 and the answer in textbox2.

Here's an example:

If the data is as follows (in Sheet 2, different columns):

Q: Who is playing in the NBA finals?

A: The Detroit Pistons and the San Antonio Spurs.

I'd like search querys entered such as: NBA, NBA Finals, Detroit
Pistons, Spurs, etc. all to return just "Who is playing in the NBA
finals" under search results, upon clicking they will recieve the
answer under "answer". I'm trying to allow cusomters to search for any
topic/phrase, and few FAQ's on them.. May sound confusing, but it's
probably a simple range modification, I just can't figure it
out...thanks and I appreciate it!


+-------------------------------------------------------------------+
|Filename: simple search form.ZIP |
|Download: http://www.excelforum.com/attachment.php?postid=3470 |
+-------------------------------------------------------------------+

--
kylev96
------------------------------------------------------------------------
kylev96's Profile:
http://www.excelforum.com/member.php...o&userid=23983
View this thread: http://www.excelforum.com/showthread...hreadid=377810



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 692
Default Searching a database in excel

Try the Find function in your code.

You might also look at InStr or Like

--
steveB

Remove "AYN" from email to respond
"kylev96" wrote in
message ...

I have attached a simple database search for excel. What it does is
searches a list of questions and answers in Sheet2 and returns matching
results in a listbox in a userform.

It works fine, however I'd like to change it to do the following:
instead of only being able to searhc the question, I'd like it to
search both the question and the answer, but still only return the
question in listbox 1 and the answer in textbox2.

Here's an example:

If the data is as follows (in Sheet 2, different columns):

Q: Who is playing in the NBA finals?

A: The Detroit Pistons and the San Antonio Spurs.

I'd like search querys entered such as: NBA, NBA Finals, Detroit
Pistons, Spurs, etc. all to return just "Who is playing in the NBA
finals" under search results, upon clicking they will recieve the
answer under "answer". I'm trying to allow cusomters to search for any
topic/phrase, and few FAQ's on them.. May sound confusing, but it's
probably a simple range modification, I just can't figure it
out...thanks and I appreciate it!


+-------------------------------------------------------------------+
|Filename: simple search form.ZIP |
|Download: http://www.excelforum.com/attachment.php?postid=3470 |
+-------------------------------------------------------------------+

--
kylev96
------------------------------------------------------------------------
kylev96's Profile:
http://www.excelforum.com/member.php...o&userid=23983
View this thread: http://www.excelforum.com/showthread...hreadid=377810



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
Update Excel Database via Access Main Database with a script Finnbar New Users to Excel 2 November 3rd 08 07:24 PM
Searching a linked database [email protected] Excel Discussion (Misc queries) 1 May 30th 07 11:11 PM
Problems searching a database and reporting all occurrences of a v Pat Excel Discussion (Misc queries) 5 December 22nd 06 10:25 AM
searching a large database with a long list of search terms [email protected] Excel Discussion (Misc queries) 34 January 10th 06 06:23 AM
Searching for variables in excel database Gavin77 Excel Discussion (Misc queries) 0 August 2nd 05 03:28 PM


All times are GMT +1. The time now is 11:00 AM.

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"