ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Lists in excel (https://www.excelbanter.com/excel-programming/370874-lists-excel.html)

Raiby

Lists in excel
 

Good morning

First,English is not my language.Then, I make an apology for my
mistakes.
Here's my excel project vba. I have a table and I want to create some
lists. In fact, I want one list for each filter. If I have five
filters, I want to print five lists.
It is just an example. The number of the filters can be high:
50,etc...I don't know beforehand this number.The other difficult is
that I want to put my filter in different columns.
For example,I have a filter in the first column. I will have five
lists. After, I put a filter in the third column and I will have three
other lists.The result is eight lists.
I have used the recorder:
Selection.AutoFilter Field:=1, Criteria1:="My first filter"
Selection.AutoFilter Field:=1, Criteria1:="My second filter"
........
And I begin again with my third column.

But, if the number of filters is high, it's too long. How can I put all
filters in my code without write them one by one? I want to print all my
lists in one time.

Thanking you in advances for your help


--
Raiby
------------------------------------------------------------------------
Raiby's Profile: http://www.excelforum.com/member.php...o&userid=37755
View this thread: http://www.excelforum.com/showthread...hreadid=573382


raypayette[_51_]

Lists in excel
 

It seems to me that you could use the recorder to do exactly what yo
want

--
raypayett

-----------------------------------------------------------------------
raypayette's Profile: http://www.excelforum.com/member.php...fo&userid=2956
View this thread: http://www.excelforum.com/showthread.php?threadid=57338


Raiby[_2_]

Lists in excel
 

Good morning

Thank you for the answer.I have used the recorder but it doesn't work
I want a universal code. If I create a new table with a differen
number of columns and different items, the code is wrong.
How make a screenshot on this site to show an example?

Thanks a lo

--
Raib
-----------------------------------------------------------------------
Raiby's Profile: http://www.excelforum.com/member.php...fo&userid=3775
View this thread: http://www.excelforum.com/showthread.php?threadid=57338


raypayette[_53_]

Lists in excel
 

Changing the variables such as the columns will affect the code and i
will be impossible to make a "universal code". Your best bet is wit
the recorder. Try and adapt the structure of your data

--
raypayett

-----------------------------------------------------------------------
raypayette's Profile: http://www.excelforum.com/member.php...fo&userid=2956
View this thread: http://www.excelforum.com/showthread.php?threadid=57338



All times are GMT +1. The time now is 07:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com