I copied an Excel macro from a previous post to check cells in column A for data, and if no data is found there to delete the row. The code is below, but how can I modify this to check cells in column B or C instead:
-----------------------------------
Sub DeleteBlankARows()
Dim r As Long
For r = Cells(Rows.Count, 1).End(xlUp).Row To 1 Step -1
If Cells(r, 1) = "" Then Rows(r).Delete
Next r
End Sub
-----------------------------------
Thanks in advance!
-----------------------------------
Sub DeleteBlankARows()
Dim r As Long
For r = Cells(Rows.Count, 1).End(xlUp).Row To 1 Step -1
If Cells(r, 1) = "" Then Rows(r).Delete
Next r
End Sub
-----------------------------------
Thanks in advance!