I have a code that finds the header by name. I also have a code for deleting entire row(s) that have no value in a cell. What I am trying to do is find a column, by the header name, and delete all rows that have no value in this column.
Here is the code I am using to find the column
Dim rngAddress As Range
Set rngAddress = Range("A1:ZA1").Find("JOBNUMBER")
If rngAddress Is Nothing Then
MsgBox "Address column was not found."
Exit Sub
End If
Range(rngAddress, rngAddress.End(xlDown)).Select
Here is the code I found to delete the entire row
Selection.SpecialCells(xlCellTypeBlanks).EntireRow.Delete
I tried to figure out how to combine without any luck. Hope someone can help.
Here is the code I am using to find the column
Dim rngAddress As Range
Set rngAddress = Range("A1:ZA1").Find("JOBNUMBER")
If rngAddress Is Nothing Then
MsgBox "Address column was not found."
Exit Sub
End If
Range(rngAddress, rngAddress.End(xlDown)).Select
Here is the code I found to delete the entire row
Selection.SpecialCells(xlCellTypeBlanks).EntireRow.Delete
I tried to figure out how to combine without any luck. Hope someone can help.