MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Remove blank rows and text

Posted by Don Levesque on January 23, 2002 12:23 PM

Everyday I get an file (comma separated values) to which I got to transfer numeric data from it onto an Excel file. I open the first file as an excel file (delimited). In this file I have a row of text, a couple of rows of data that I need to transfer or copy and this is followed by a few blank rows and so on.

Can a macro be created to:
1. Delete the content of all the cells that contain only text.

2. Delete the rows that have only blank cells within a assigned number of row (ex. from 1 to 50)

Once this is done I can copy all the data needed at once and paste it into my second Excel file

Posted by Skrappy on February 08, 2002 4:29 PM

Record this macro using the macro recorder:
Edit: Go To
Select Special
Select Entire Range
Edit: Go To
Select Special
Select Blanks
Right Click and Delete