Hello,
I'm fairly new to Excel macros and am not a programmer, but I'm trying to create a macro that will delete rows in a spreadsheet if the cell in column A of that row is empty. I made a macro that does this, but the problem I'm having is that I only want it to run on a specified range of cells. For example, I only want the macro to affect rows 7 to row 38 in the example below. When I run the macro, it runs on all rows. The first few rows in my spreadsheet have blank cells in column A (but have data in the other columns), but I need to retain these rows.
Sub DeleteRowifCellAisBlank()
ActiveSheet.Range("A7:F38").Select
Columns(1).SpecialCells(xlCellTypeBlanks).EntireRow.Delete
End Sub
How can I edit this so that it only runs on a specified range? I have about 15 different 30,000+ row spreadsheets, all with different ranges of cells that contain data. Any help will be much appreciated.
Bookmarks