gimli
03-29-2011, 10:15 AM
Hi,
Im looking to delete a row if the first cell is the defaut value of an excel cell..not sure what the default value of a cell is..i think its blank. So if A1 is default value I want the whole row deleted...
thanks much
Option Explicit
Sub DeleteRow()
Dim rRow, Nrow As Long
Dim oneCell As Range
rRow = Range("A1").End(xlDown).Row
For Each oneCell In Range("a1", Cells(rRow, 1)).Cells
If Left(oneCell.Value, 1) = " " Then
oneCell.EntireRow.Delete
End If
Next
End Sub
Im looking to delete a row if the first cell is the defaut value of an excel cell..not sure what the default value of a cell is..i think its blank. So if A1 is default value I want the whole row deleted...
thanks much
Option Explicit
Sub DeleteRow()
Dim rRow, Nrow As Long
Dim oneCell As Range
rRow = Range("A1").End(xlDown).Row
For Each oneCell In Range("a1", Cells(rRow, 1)).Cells
If Left(oneCell.Value, 1) = " " Then
oneCell.EntireRow.Delete
End If
Next
End Sub