Hi abdulie,
I can't fully understand why Autofilter won't do. However, the
following macro will ask you to select the heading of the column where
you are wanting rows with nonnumeric values to be hidden. It will then
do so for all the cells below the selected heading cells. If your
heading occupies more than one row make sure you select the whole
heading.
Public Sub HIDE_NONNUMERIC_QUANTITIES()
Dim C As Range
Dim stMessage As String
Dim rngHEADING As Range
Dim rngMODIFY As Range
Dim intColumn As Integer
Dim intBase As Long
stMessage = "Select the heading of the column "
stMessage = stMessage & "with nonnumeric values to be hidden."
Set rngHEADING = Application.InputBox _
(prompt:=stMessage, Type:=8, Default:=Selection.Address)
If rngHEADING.Columns.Count > 1 Then
MsgBox "This macro can only work on a single column."
Exit Sub
End If
intColumn = rngHEADING.Column
intBase = 65537 - ActiveSheet.Range(Cells(65536, intColumn), _
Cells(65536, intColumn).End(xlUp)).Rows.Count
Set rngMODIFY = ActiveSheet.Range(Cells(rngHEADING.Rows.Count + 1, _
intColumn), Cells(intBase, intColumn))
Application.ScreenUpdating = False
For Each C In rngMODIFY
If Not (Application.IsNumber(C.Value)) Then C.EntireRow.Hidden = True
Next C
End Sub
To undo the hiding just click on any column header to select a whole
column then go Format>Rows>Unhide.
Ken Johnson