Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Update Excel Database via Access Main Database with a script | New Users to Excel | |||
Searching a linked database | Excel Discussion (Misc queries) | |||
Problems searching a database and reporting all occurrences of a v | Excel Discussion (Misc queries) | |||
searching a large database with a long list of search terms | Excel Discussion (Misc queries) | |||
Searching for variables in excel database | Excel Discussion (Misc queries) |