Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Jul 2006
    Posts
    531
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Correct Coding for wildcard filter (2003)

    Is there a wildcard command so that if l run a macro it will filter on the word Blue Sky - <country>

    i.e. if l have the words

    Blue Sky - UK
    Blue Sky - RFS

    It will pick these up?

    In the macro l have the coding:


    Selection.AutoFilter Field:=6, Criteria1:="Blue Sky - ?"

    See attached for screenshot which shows fields in red l want to filter on.

    Any help would be appreciated.
    Attached Images Attached Images

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Correct Coding for wildcard filter (2003)

    Use an asterisk instead of the question mark:
    <code>Selection.AutoFilter Field:=6, Criteria1:="Blue Sky - *"</code>
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    4 Star Lounger
    Join Date
    Jul 2006
    Posts
    531
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Correct Coding for wildcard filter (2003)

    Many thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •