Hi,
I have a worksheet in which there have some around 15 columns data is there. But I want to get data will show in listbox y using filter commands in userform.
My 1st row is Office Type where only 2 option is there. A. Branch & B Sales Office
In 2nd Row is Zone in which South, North, West & East will be there.
3rd Row is State where I will select a particular state from excel file.
In 5th Row there is Branch Status where I will select the option.
In 8th Row there is Agreement status where I will select the option.
All the above 5 rows I will put combobox as per sorting options.
But how to get data in list box as per selection please help.
Herewith I have attached a file for your reference. Please refer the userform created.
Filter Multiple Fields in Userform
-
-
-
Re: Filter Multiple Fields in Userform
have a look at this
-
Re: Filter Multiple Fields in Userform
Dear Sir,
This below link is not opened and showing error message.Quote from ashu1990;739841 -
Re: Filter Multiple Fields in Userform
another helpfull links
http://www.ozgrid.com/forum/showthread.php?t=158906
-
Re: Filter Multiple Fields in Userform
Thanks Mr. Ashu,
Both i have checked. I think it will solve my issue. If have any query i will update you later. Thanks Again. -
-
Re: Filter Multiple Fields in Userform
Hi, Mr.Ashu,
I have tried one example from this site : http://www.ozgrid.com/VBA/listbox-filter.htm
Herewith i have attached the sheet for your reference. But i cant got the date in listbox. Only one cell is showing in listbox. Please solve this issue.forum.ozgrid.com/index.php?attachment/64285/forum.ozgrid.com/index.php?attachment/64285/forum.ozgrid.com/index.php?attachment/64285/forum.ozgrid.com/index.php?attachment/64285/forum.ozgrid.com/index.php?attachment/64285/forum.ozgrid.com/index.php?attachment/64285/ -
-
Re: Filter Multiple Fields in Userform
Dear Mr. Roy,Thanks for your help.
In your file the format and data is ok. But it picks only one filter at once. When filter B column “Long Distance” it comes the result. But when select “Long Distance” & “Mar” from Month list it will comes only”Mar” record. In excel it shows all 4 records of Mar but in listbox it shows 5 records.
I need when i will select first B column data and then C column it will show only records of “Long Distance”of “Mar” i.e. only 2 record. The same filter will be for D & E column too. When i am selecting only D & E column the filter command is not works.
Second i need the data of Listbox will be copied in another sheet when i will press Done command button.
Thanks Again. -
Re: Filter Multiple Fields in Userform
Peobably the best approach would be to use AdvancedFilter. I'll take a look tomorrow.
-
Re: Filter Multiple Fields in Userform
Hi,
Herewith i have attached a file in which i have worked for autofilter. Everything is looking ok. But the problem is it will take 1st row for advance filter and due to this the filter data is showing in listbox 2 named 1stlist. Please help me how can i use autofilter in 2nd row instead of 1st. Thanks. -
-
Re: Filter Multiple Fields in Userform
The code doesn't use Advanced filter.
To use Excel as a database then you should set out the data correctly. You should only have one Header row, Excel interprets your Header Row to be line 1. You really need to understand the basics of AutoFilter before attempting to write code to automate it.
-
Re: Filter Multiple Fields in Userform
Thanks Mr. Roy for your comment. Actually i thought if there any way in VBA. Because i am not so familier with vba. Thanks again.
-
Re: Filter Multiple Fields in Userform
Mr Roy,
I have checked my data with one row header. But till the data of the filtered records is not shown in listbox. Please help.
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!