Comparing and deleting cells

D

David Jacobs

I am trying to compare the contents of a cell and the one below it. If it
is the same then delete the upper one.Have come up with this (please don't
laugh):

For cellcount = 1 To 500
If Cells(B, cellcount) = Cells(B, cellcount + 1) Then
Cells(B, cellcount).Delete (xlShiftUp)
End If
Next

Have absolutely no idea about Excel Macro's but am keen to learn, in fact
this is my first shot so if someone could help with answers in one
syllable!!

FIA

David Jacobs
 

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

Top