Filter for length of text
Eliminate Pivot Table Annoyances
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: Filter for length of text

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Location
    Tasmania
    Posts
    58
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    Can you use filtering to select text of a given length - eg 3 characters long? (or is VBA needed)
    Thank You

  2. #2
    MrExcel MVP Tom Urtis's Avatar
    Join Date
    Feb 2002
    Location
    San Francisco, California USA
    Posts
    11,136
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    You can do this without VBA, using an AutoFilter. For the criteria, select "Custom". In the Custom AutoFilter dialog box's first field, choose "equals", and in the criteria field to the right of that, enter three question marks (???), to represent 3 characters as in your specific example. That will filter for cells in that column containing 3 characters.

  3. #3
    Board Regular
    Join Date
    Mar 2002
    Posts
    134
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    For even more flexibility you could create a second column with the following formula in it:

    =len([firstcolumn,firstrow])

    then pull that formula down to all the rows containing the data.

    This will give you the length of each entry in the column containing your data. You can then custom filter on the length. You can set the filter to show you rows which have less than, less than or equal to, greater than, greater than or equal to, or between a certain number of characters. So this filter is set on the column containing the lenght formulas but effects the column containing your data.

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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

 

 
DMCA.com