rjplante
Well-known Member
- Joined
- Oct 31, 2008
- Messages
- 574
- Office Version
- 365
- Platform
- Windows
I have several macros (8 of them) that are linked. At the end of macro 1 I call macro 2. At the end of macro 2, I call macro 3 and so on. The macros apply a series of filters to a worksheet. One of the filters has a lot of names in them. Is it possible to define a global definition of the filter names so that if I need to add an additional name, it is only in one area. Then when I apply the filter in each macro, I can just use the defined name from my global definitions list. I have some sample code of what it would look like below.
Let me know if this is possible.
option 2
Is it possible to set up an array filter where I can use an asterisk with the list to catch everything in the filter. For example "2500", "2501", "2502", "2502A", "2503", "2504", "2505" = "250**".
Thanks for the help.
Code:
GlobalDim MAPC As Long
MAPC = "2500", "2501", "2502", "2502A", "2503", "2504", "2505", _ "ABC001", "ABC002", "TEST-TOOL", "LLL-MORE"
ActiveSheet.Range("$A$5:$O" & lastrow).AutoFilter Field:=13, Criteria1:=Array( MAPC), Operator:=xlFilterValues
Let me know if this is possible.
option 2
Is it possible to set up an array filter where I can use an asterisk with the list to catch everything in the filter. For example "2500", "2501", "2502", "2502A", "2503", "2504", "2505" = "250**".
Thanks for the help.