View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student
 
Posts: n/a
Default How do I filter for items that end in %

let's say you have a list of values in column A:
label
1
10
$10.25
34%

and you want to show only the % values. First enter this UDF:


Function perzent(R As Range) As Boolean
' gsnu
Dim s As String
s = R.NumberFormat
If Right(s, 1) = "%" Then
perzent = True
Else
perzent = False
End If
End Function


Then in B1 ente and label cell and in B2 enter:
=perzent(A2) and copy down

Only the % values will show TRUE. Pull down Filter Autofilter and select
TRUE from the filter pull-down.
--
Gary''s Student


"Janet M." wrote:

I have a listing of $values, %values and plain numbers. I want to filter
only for the values ending with %.