Filter by line break

  • Thread starter Thread starter solomon_monkey
  • Start date Start date
S

solomon_monkey

If you have a line break character in an Excel Cell (i.e. you press Alt
& Enter) is there any way you can filter by cells containing this?
Regards,
 
Yes it's possible.
At the last row + 1, double click on cell and just press Alt+Enter. So
this cell has only the line break nothing else.
Inlcude this row when setting the Data filer.
In filter chose Custom, and give following condition:-

Contains: -> Click on drop down and select the empty row (which will be
at the top and contains the line break)

And

Does not end with:-> Click the drop down and again selectg the same
empty row.

Sharad
 
To do this manually:

From the dropdown list in the column heading, choose Custom
From the first dropdown, choose Contains
In the text box, hold the Alt key, and on the number keypad,
type: 0010
Click OK

To filter programmatically, use Chr(10), e.g.:

Selection.AutoFilter Field:=4, _
Criteria1:="=*" & Chr(10) & "*", Operator:=xlAnd
 
Thanks Debra... is there a similar simple code for filtering the colour
of a cell?
 
Back
Top