1 FILTERING help PLSsss

jjoseph

New member
Joined
Jun 3, 2012
Messages
3
Reaction score
0
Points
0
I want a comparison to be done between the text values in column A & B. Find the matches and deleted the matching cell values from column A. Column B's data should not get deleted.

How do I do it?
 
Off the top

Code:
With Activesheet

    lastrow = .Cells(.Rows.Count, "A").End(xlUp).Row
    For i = lastrow to 1 Step -1

        If Not IsError(Application.Match(.Cells(i, "A").Value, .Columns(2),0)) Then

            .Cells(i, "A").Delete Shift:=xlUp
        End If
    Next i
End With
 
I want a comparison to be done between the text values in column A & B. Find the matches and deleted the matching cell values from column A. Column B's data should not get deleted.

How do I do it?


Code:
Sub deleteA()
Dim endRow As String
Sheets("Sheet1").Select
endRow = Range("A65536").End(xlUp).Row
Range("A1", "A" & endRow).Select
For Each cell In Selection
cell.Select
i = ActiveCell.Row
If Range("A" & i) = Range("B" & i) Then ActiveCell.Clear
Next
End Sub

Here is an alternative that I think will work, it doesn't delete the cell in column A, just clears the text from it.

HTH

Aidan
 
Back
Top