+ Reply to Thread
Results 1 to 4 of 4

VBA Excel Script to only show cells with certain characters (filter)

  1. #1
    Registered User
    Join Date
    07-10-2018
    Location
    Cheshire
    MS-Off Ver
    2016
    Posts
    4

    VBA Excel Script to only show cells with certain characters (filter)

    0
    down vote
    favorite
    I want an Excel VBA script to only show sells that contain any of the below characters:

    ?:!#$%&'*+/=?^,`<>{|}~;:?:%()»¢…&[]ä€\_’”"):
    I found below script - but this only works on one of the above, and it's taking too long to use the Excel user-interface to put one of the characters at a time.

    Here's the script I ahve that just filters one of the characters at a time - I want one that will filter to show all cells that contain at least one of these special characters:

    Sub Macro1()
    Columns("A:A").AutoFilter
    ActiveSheet.Range("$A$1:$A$5").AutoFilter Field:=1, Criteria1:="=*>*", _
    Operator:=xlAnd
    End Sub

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: VBA Excel Script to only show cells with certain characters (filter)


    As there is no special character, it's can be done without a code just using Excel basics
    with a formula helper column returning TRUE or FALSE where you can apply a filter …

  3. #3
    Registered User
    Join Date
    07-10-2018
    Location
    Cheshire
    MS-Off Ver
    2016
    Posts
    4

    Re: VBA Excel Script to only show cells with certain characters (filter)

    This has a good tutorial on this ExtendedOffice.

    But quite fiddly and time consuming. Would prefer a quick and dirty VBA formula if this is possible?

  4. #4
    Registered User
    Join Date
    07-10-2018
    Location
    Cheshire
    MS-Off Ver
    2016
    Posts
    4

    Re: VBA Excel Script to only show cells with certain characters (filter)

    Using the formula approach means Excel struggles to regnise ~, ? and *

    But might be fix for this.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. VBA - Excel 2013 - Count - Filter - Stop - Carry on script
    By dude6571 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-03-2017, 04:31 PM
  2. Replies: 3
    Last Post: 05-24-2015, 11:44 AM
  3. [SOLVED] Custom cells (column) to enter and show specific length of characters
    By roshanakhtar in forum Excel General
    Replies: 6
    Last Post: 05-19-2015, 03:51 AM
  4. How to show blanks cells in this excel macro filter ?any idea?
    By meonly123 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-16-2014, 02:14 AM
  5. how do i filter data by number of characters in excel?
    By monkeytrader in forum Excel General
    Replies: 6
    Last Post: 08-26-2013, 03:12 AM
  6. Replies: 1
    Last Post: 07-05-2012, 08:48 AM
  7. show unicode characters in excel 97
    By mowali in forum Excel General
    Replies: 0
    Last Post: 03-09-2005, 01:22 PM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1