PDA

View Full Version : Solved: search workbook



dupledge
07-07-2006, 06:17 PM
I have a series of worksheets with the following format

Fisrtname,Surname,Landline, cellphone, email
John Doe 1234567890 1234567890 jdoe@somewhere.com

I need to creat a search form that lets a user enter firstname or surname or both and it return just the firstname/surname/landline/cellphone in the matching row (or rows if duplicated). If a user enters just the firstname or just the surname it should return firstname/surname/landline/cellphone in the matching row/s Can this be done. I currently have it searching ranges but can only get it to return on one search criteria (eg surname only)

lucas
07-07-2006, 07:52 PM
You want it to highlight or select a row?

lucas
07-07-2006, 08:26 PM
There's probably a much better way but you could put the data in a listbox and then search the listbox....see attached.

dupledge
07-07-2006, 08:47 PM
Thanks for your prompt reply Lucas
What I cuurrently have are 4 worksheets and WKS' 2-4 have regional contact details. On the first WKS I have two inputBoxes, one for firstname and one for surname, plus a search button and a listbox. When a match is found (and there may be more than one match) I get it to place the match/es into the listbox. My problem is that I thought surname would be enough to search on but now realise it would be more versatile to be able to search by both firstnam and surname or either. I do not need the rows in the worksheets highlighted I need the rows copied to the listbox.