I\'m using an Advanced Filter, among others, with 0 and 1\'s. The filter works correctly only if in the Data sheet the cells with 1 and 0 have the error message \"Number stored
You'll find that buried deep in the Range properties for the cells, specifically in the Errors collection. Just find the cells where that error is present, then set the Ignore
property to True
:
Public Sub IgnoreNumsAsText()
Dim current As Range
For Each current In ActiveSheet.UsedRange.Cells
With current
If .Errors.Item(xlNumberAsText).Value = True Then
.Errors.Item(xlNumberAsText).Ignore = True
End If
End With
Next current
End Sub