Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dear all,
I'm designing an interface for searching, but I don't know how to show the result based on criteria and selected fields. For search criteria, I also want to know how to active fuzzy search, for instance, if I only type 'country=U', the search result would show U.K, USA and Ukrane. First of all, I have a data table (transferred directly from SQL server database) and an userform, in this userform, I could choose which field I want to show (2 listboxes, when I click fields in left listbox, they will be shown in right box, I want to only show these seleced fields ), Secondly, I could also make criteria for search in this userform, this part is made of 1 listbox, 3 comboboxes and 2 textboxes. 1. one listbox to show final criteria results 2. 3 comboboxes, two of them show criteria name, like 'equal', 'all' , 'more than'. one shows logic relationship, like 'and', 'or ' 3. 2 textboxes, I can input value or text inside, 4. 2 combobox and 2 textboxes combine together to make expression, like value more than 5, country equal to u.k, another combobox shows logic relationship between 2 criteria Please give me some suggestion or tips, thanks a lot. If you are interested, please leave your Email address, I'll send you the sample ASAP. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sorry, I forgot to say that all is done in Excel with VBA.
|
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Use an autofilter from the data menu.
You can set the criteria with code using your userform results. Turn on the macro recorder and apply the filter manually, -- in the dropdown of the filter, select custom and you will be able to use criteria like Begins with, contains, greater than and so forth. Turn of the macro recorder when done and you can modify the code to build the criteria based on the userform values. -- Regards, Tom Ogilvy "Kortrijker" wrote in message ... Dear all, I'm designing an interface for searching, but I don't know how to show the result based on criteria and selected fields. For search criteria, I also want to know how to active fuzzy search, for instance, if I only type 'country=U', the search result would show U.K, USA and Ukrane. First of all, I have a data table (transferred directly from SQL server database) and an userform, in this userform, I could choose which field I want to show (2 listboxes, when I click fields in left listbox, they will be shown in right box, I want to only show these seleced fields ), Secondly, I could also make criteria for search in this userform, this part is made of 1 listbox, 3 comboboxes and 2 textboxes. 1. one listbox to show final criteria results 2. 3 comboboxes, two of them show criteria name, like 'equal', 'all' , 'more than'. one shows logic relationship, like 'and', 'or ' 3. 2 textboxes, I can input value or text inside, 4. 2 combobox and 2 textboxes combine together to make expression, like value more than 5, country equal to u.k, another combobox shows logic relationship between 2 criteria Please give me some suggestion or tips, thanks a lot. If you are interested, please leave your Email address, I'll send you the sample ASAP. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
fields names do not show in excel 2007 pivot table fields list | New Users to Excel | |||
Search 2 Criteria for 1 sep result | Excel Discussion (Misc queries) | |||
Multiple criteria options determine which name to show as result. | Excel Worksheet Functions | |||
Input one criteria to search in 5 fields | Excel Discussion (Misc queries) | |||
Autofit on rows within a specifed range | Excel Programming |