Home > Enterprise >  Removing Non-numeric cells from a column in excel
Removing Non-numeric cells from a column in excel

Time:03-30

I have a huge dataset in Excel with numeric and non-numeric data. For further analysis i have to exclude all the numeric data. An idea i had was to create a new column and divide all these cells by 1 and to use only the data with errors. However, are there any other possible ways to do so?

Best regards and thanks in advance

CodePudding user response:

This should work :

Sub Macro()

Dim data As Range
Dim Cel As Range

Set data = Range("[Put here the range of your datas]")

    For Each Cel In data
        If IsNumeric(Cel.Value) Then
            Cel.Value = ""
        End If
    Next Cel
    
End Sub

CodePudding user response:

In the attached screenshot, you see that sometimes column A contains a number, and sometimes B contains a number.
Do you want to filter on both, as expressed in column G, or do you want to filter on just one of them, as expressed in column H?

enter image description here

  • Related