Klaus shows how to clear a cell in column B if the cell
in column A is blank.
The question asks how to "delete" A & B
Sub DeleteRows()
Dim Target As Range, thisrow As Range
Dim cell As Range
Set Target = _
ThisWorkbook.Names("MyTable").RefersToRange
For Each thisrow In Target.Rows
If thisrow.Range("A1") = "" Then
thisrow.Delete
End If
Next
End Sub
This will remove all cells in a table row - just pass the
table name or set the Target range to whatever range you
want
Patrick Molloy
Microsoft Excel MVP
-----Original Message-----
I need to write a macro to run through a list of values
in column A and
B.
If column A is blank, then I have to delete cells A and B
correspondingly.
Is it very difficult to do that?
---
Message posted from http://www.ExcelForum.com/
.