Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,118
Default Filtering on String Length

Perhaps something like this?:

Worksheets("Sheet1").Range("A1").AutoFilter _
field:=1, _
Criteria1:="????????", _
VisibleDropDown:=False

Does that help?
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)


"Keith Wilby" wrote in message
...
What VBA code would I need to set a filter based upon string length in a
cell, for example, if I wanted to filter column A for those entries 8
characters in length?

I found this in the help:

Worksheets("Sheet1").Range("A1").AutoFilter _
field:=1, _
Criteria1:="Otis"
VisibleDropDown:=False

but I don't know how adapt that for my needs. I guess I need to use the
Len function somewhere in there.

A little background - I am creating and formatting the spreadsheet from
within MS Access.

Many thanks.
Keith.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Finding a string of unknown length in a string of unknown length, Help! Hankjam[_2_] Excel Discussion (Misc queries) 8 July 3rd 08 06:49 PM
String length jxbeeman Excel Discussion (Misc queries) 1 January 10th 08 07:01 PM
Filtering on String Length Tom Ogilvy Excel Programming 1 September 17th 07 05:07 PM
string length Yan Robidoux[_10_] Excel Programming 3 August 19th 04 04:13 PM
Counting string length The Wonder Thing[_3_] Excel Programming 4 August 3rd 04 09:23 PM


All times are GMT +1. The time now is 01:07 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"