Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Filter by line break

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,

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 123
Default Filter by line break

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



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,979
Default Filter by line break

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


solomon_monkey wrote:
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,



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Filter by line break

Thanks Debra... is there a similar simple code for filtering the colour
of a cell?

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,979
Default Filter by line break

You're welcome. There's nothing similar for code. You could add a column
to the table, and use some of Chip Pearson's code for extracting colour
values. Then, filter on the new column.

http://www.cpearson.com/excel/SortByColor.htm

solomon_monkey wrote:
Thanks Debra... is there a similar simple code for filtering the colour
of a cell?



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

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
line break does not appear in CSV BFON Excel Discussion (Misc queries) 3 April 29th 10 04:23 PM
Line break within a field Albert Kaegi Excel Worksheet Functions 1 November 21st 07 03:04 PM
Line break GARY Excel Discussion (Misc queries) 1 November 6th 07 12:00 AM
Break cell into multiple lines by line break Chia Excel Discussion (Misc queries) 1 August 20th 06 06:37 AM
Line Break Ramthebuffs Excel Discussion (Misc queries) 4 August 22nd 05 08:52 PM


All times are GMT +1. The time now is 07:22 PM.

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"