#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Excel 2003 Filtering

Hello,
I have a column of data (data are numbers and text) in Excel (around 1000+
items) and they have different font, font size and color. How to use
Autofilter/Advance Filter or any other means, to filter out say all items
that are RED in color, or items with Times Roman as Font, or items with Font
size 10.
Pls help!

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Excel 2003 Filtering

Well, here's a slightly convoluted approach.

Define a function in visual basic like the one below. (It just returns
true if any one of the cells in the selected range has red text in it.)

Function ItsRed(selectedRange As Range) As Boolean

Dim r As Long
Dim c As Long

On Error GoTo oops
If False Then
oops:
Exit Function
End If

ItsRed = False

For c = 1 To selectedRange.Columns.Count
For r = 1 To selectedRange.Rows.Count
If selectedRange.Cells(r, c).Font.Color = vbRed Then
ItsRed = True
End If
Next r
Next c
End Function


insert a column (say, B) next to your column of text (in A), and insert
the function like this:

=ItsRed(a2)

assuming that the text is in column A and the formula is in column B.
Notice in this case, the selected range passed to ItsRed is a single
cell, a2.

Then filter for true in column b.

I suspect that there are simpler ways to do it, but they're not leaping
out at me tonight. You should be able to test for other attributes
similarly, and filter accordingly.

Good luck,
Ed

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Excel 2003 Filtering

... or speaking of simpler, just return the color instead of true /
false and filter for that.

Ed

wrote:
Well, here's a slightly convoluted approach.

Define a function in visual basic like the one below. (It just returns
true if any one of the cells in the selected range has red text in it.)

Function ItsRed(selectedRange As Range) As Boolean

Dim r As Long
Dim c As Long

On Error GoTo oops
If False Then
oops:
Exit Function
End If

ItsRed = False

For c = 1 To selectedRange.Columns.Count
For r = 1 To selectedRange.Rows.Count
If selectedRange.Cells(r, c).Font.Color = vbRed Then
ItsRed = True
End If
Next r
Next c
End Function


insert a column (say, B) next to your column of text (in A), and insert
the function like this:

=ItsRed(a2)

assuming that the text is in column A and the formula is in column B.
Notice in this case, the selected range passed to ItsRed is a single
cell, a2.

Then filter for true in column b.

I suspect that there are simpler ways to do it, but they're not leaping
out at me tonight. You should be able to test for other attributes
similarly, and filter accordingly.

Good luck,
Ed


  #4   Report Post  
Posted to microsoft.public.excel.misc
Mia Mia is offline
external usenet poster
 
Posts: 101
Default Excel 2003 Filtering

Hi
You can use edit - serch instead of filter. In the search you can chose the
format you want to find, and then you can search for all matches.

Mia

"Jrufin" skrev:

Hello,
I have a column of data (data are numbers and text) in Excel (around 1000+
items) and they have different font, font size and color. How to use
Autofilter/Advance Filter or any other means, to filter out say all items
that are RED in color, or items with Times Roman as Font, or items with Font
size 10.
Pls help!

Thanks.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Excel 2003 Filtering

Thanks i'll try also..

"Mia" wrote:

Hi
You can use edit - serch instead of filter. In the search you can chose the
format you want to find, and then you can search for all matches.

Mia

"Jrufin" skrev:

Hello,
I have a column of data (data are numbers and text) in Excel (around 1000+
items) and they have different font, font size and color. How to use
Autofilter/Advance Filter or any other means, to filter out say all items
that are RED in color, or items with Times Roman as Font, or items with Font
size 10.
Pls help!

Thanks.



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Excel 2003 Filtering

Thanks i'll try...

" wrote:

Well, here's a slightly convoluted approach.

Define a function in visual basic like the one below. (It just returns
true if any one of the cells in the selected range has red text in it.)

Function ItsRed(selectedRange As Range) As Boolean

Dim r As Long
Dim c As Long

On Error GoTo oops
If False Then
oops:
Exit Function
End If

ItsRed = False

For c = 1 To selectedRange.Columns.Count
For r = 1 To selectedRange.Rows.Count
If selectedRange.Cells(r, c).Font.Color = vbRed Then
ItsRed = True
End If
Next r
Next c
End Function


insert a column (say, B) next to your column of text (in A), and insert
the function like this:

=ItsRed(a2)

assuming that the text is in column A and the formula is in column B.
Notice in this case, the selected range passed to ItsRed is a single
cell, a2.

Then filter for true in column b.

I suspect that there are simpler ways to do it, but they're not leaping
out at me tonight. You should be able to test for other attributes
similarly, and filter accordingly.

Good luck,
Ed


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
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
Excel 2003 compatibility Alain Excel Discussion (Misc queries) 0 June 23rd 06 11:02 AM
Cannot Open Webpage With Excel 2003 rdshadden Excel Discussion (Misc queries) 0 May 25th 06 05:59 AM
Very slow in opening Excel 97 file in Excel 2003 S M Setting up and Configuration of Excel 0 October 22nd 05 07:32 PM
sharing/using/saving Excel 2002 files in Excel 2003 maze2009 Excel Discussion (Misc queries) 0 January 20th 05 07:27 PM


All times are GMT +1. The time now is 07:15 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"