View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Pedros[_14_] Pedros[_14_] is offline
external usenet poster
 
Posts: 1
Default Deleting blanks rows based on multiple criteria


Below is a macro used to delete the entire row if a the cell in the
specified column is blank.

Can anyone suggest a way to change this macro so that it can be used to
delete a row if the cells in two different columns are both blank?

ie. If any cells are in the same row of column B and E are blank then
delete that row.

The code I have used for a single column is this:

Sub DeleteRowOnCell()

On Error Resume Next
Columns("E:E").Select
Selection.SpecialCells(xlCellTypeBlanks).EntireRow .Delete
ActiveSheet.UsedRange

End Sub

Thanks in advance!!


--
Pedros
------------------------------------------------------------------------
Pedros's Profile: http://www.excelforum.com/member.php...o&userid=28202
View this thread: http://www.excelforum.com/showthread...hreadid=565462