delete

  • Thread starter Thread starter millydeaman
  • Start date Start date
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?
 
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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top