Link to home
Start Free TrialLog in
Avatar of Dan Carp
Dan Carp

asked on

Include "Starts with" in VB Array

I've got a line in a VB script that currently reads:

ActiveSheet.Range("$A$1:$DD$500").AutoFilter Field:=6, Criteria1:=Array( _ "0a", "1b", "s", "t", "ss"), Operator:=xlFilterValues

Open in new window


I need to add to this line to have it include in the array the existing items plus anything in Field 6 that begins with a "z".  I understand that to determine whether a string starts with "z" I can do this:

Result = String1 Like "z*"

Open in new window


But could somebody explain to me how I could incorporate that result into the array?  Thanks!
ASKER CERTIFIED SOLUTION
Avatar of Rgonzo1971
Rgonzo1971

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Dan Carp
Dan Carp

ASKER

Thanks Rgonzo1971 - appreciate the clarity of your script.  Will hold onto these steps for future needs.  Cheers!