Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Filtering on String Length
in an adjacent column, but in the formula
M2: =len(B2) Range("M2:M200").Formula = "=Len(B2)" then apply your filter to column M. -- Regards, Tom Ogilvy "Keith Wilby" wrote: 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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Filtering on String Length
"Tom Ogilvy" wrote in message
... in an adjacent column, but in the formula M2: =len(B2) Range("M2:M200").Formula = "=Len(B2)" then apply your filter to column M. Spot on, working a treat. Thanks Tom. Keith. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Zero-Length string vs Zero (also a valid value) | Excel Worksheet Functions | |||
Finding a string of unknown length in a string of unknown length, Help! | Excel Discussion (Misc queries) | |||
String length | Excel Discussion (Misc queries) | |||
string length | Excel Programming | |||
Counting string length | Excel Programming |