delete

M

millydeaman

how can i have a macro check to see if there is a value in
column b if there is to move on to next cell in column b
if not to delete the corresponding cells in column a and d?
 
M

Melanie Breden

how can i have a macro check to see if there is a value in
column b if there is to move on to next cell in column b
if not to delete the corresponding cells in column a and d?

try this:

Dim rngArea As Range
Set rngArea = Worksheets(1).Columns("B").SpecialCells(xlCellTypeBlanks)
Application.Union(rngArea.Offset(0, -1), rngArea.Offset(0, 2)).Value = ""

--
Mit freundlichen Grüssen

Melanie Breden
- Microsoft MVP für Excel -

http://excel.codebooks.de (Das Excel-VBA Codebook)
 
Top