Help required on a formula

  • Thread starter Thread starter Gavin
  • Start date Start date
G

Gavin

I import a large file which may have a few hundred rows.
in the rows there are the following
Zero value cell, Blank cell and numerical cells
I need to remove the cells that have a Zero value cell or are Blank.
Only the numerical cell need to remain

The starting cell is E7

So if E7 has a numerical value. move to E8 if numerical move to E9 etc.
if however there is a blank space or a zero the row needs to be
deleted.

Your help greatly appriciated

Thanks Gavin
 
Sub Clrdata()
For i = 0 To 2000 '2000 if you have 2000 rows, 3000 for 3000 rows etc
Sheets("Sheet1").Select 'Sheet with info on
Cells(7 + i, 5).Select 'row 7, column E=5
If ActiveCell = "" Then Rows(7 + i).Delete Shift:=xlUp
If ActiveCell = "0" Then Rows(7 + i).Delete Shift:=xlUp
Next
End Sub
 
If you don't need to delete the rows you could try to 'autofilter' the list.

Then do a custom filter on the lines of ' is greater than' 0.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top