removing unwanted data

MAMIBUSSOL

Board Regular
Joined
Jun 2, 2011
Messages
95
I have a sheet of data, with various columns and rows, however I can use coulmn AT to help me remove some unwanted information, the column holds at the moment text which I wish to remove and numbers which I need to keep.

on the rows which contain text I wish to remove the entire row.

not sure if it is relevant but each of cells is a calulation
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
This will remove text entries from column "A"
Code:
Sub moo()
Dim lr As Long, r As Long
lr = Cells(Rows.Count, "A").End(xlUp).Row
    For r = lr To 1 Step -1
        If Application.WorksheetFunction.IsText(Range("A" & r)) Then
            Rows(r).Delete
        End If
    Next r
End Sub
 
Upvote 0
You could do this quickly without VBA (if that is an advantage for you)
- create a working column using ISTEXT to identify what cells are numeric, and which are strings, ie =ISTEXT(AT1) and copy down
- Autofilter the FALSE (number) results, then delete these rows

Cheers

Dave
 
Upvote 0

Forum statistics

Threads
1,224,591
Messages
6,179,768
Members
452,940
Latest member
rootytrip

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top