Custom Autofilter yields no results
Excel does not recognize numerics as "ending with".
That is reserved for text cells.
If you pre-format the cells as text before entering the numbers, the numbers
will act like text.
Since you have your numbers already in place, you have to append a letter or
apostrophe to the beginning of each cell.
Is there any other criterion you could use rather than "ends with"?
Maybe greater than or somesuch?
If not, here is a macro to add an apostrophe or any text in every cell in your
selected range.
Note: after running, you will not be able to calculate those cells.
Sub Add_Text_Left()
Dim cell As Range
Dim moretext As String
Dim thisrng As Range
On Error GoTo endit
Set thisrng = Range(ActiveCell.Address & "," & Selection.Address)
moretext = InputBox("Enter your Text")
For Each cell In thisrng
cell.Value = moretext & cell.Value
Next
Exit Sub
endit:
End Sub
Gord
On Thu, 20 Jul 2006 12:08:01 -0700, rjejyork
wrote:
Why would it matter if the value of the cell in which I am trying to use the
"ends with" criteria, are all numbers. None of the suggestions worked that
you both stated. As a test, I took a small sampling of my spreadsheet, added
a letter value to the beginning of each number value and now the "ends with"
works.
How can I get this to work without having to add a letter to each cell value
just because it is all numbers? Help?
"Gord Dibben" wrote:
Cell formatting should have no effect on the "ends with" criterion.
Formatting does not change the actual content of a cell, just the appearance of
the content.
Are you sure you have the entire range selected?
Do you have a typo in the "ends with" dialog?
Gord Dibben MS Excel MVP
On Thu, 20 Jul 2006 10:40:02 -0700, rjejyork
wrote:
I have a worksheet, where I am trying to do a custom autofilter using the
"ends with" criteria. I've had success in another worksheet with this, but
everytime I do it in the new one it does not yield any results. i've made
sure the cell formatting is correct. Any thoughts or suggestions why this
isnt working
Gord Dibben MS Excel MVP
|