Hi
I have a macro where
I paste data into 5 columns (A:E) in a tab. Then filter by the N's in column E, then remove the duplicate values in column A.
However, I've noticed the removing of duplicates isn't working, as expected.
It removes duplicates in column A, which results in several rows at the bottom of column A being blank, whilst the correspoding rows in columns B:E still have data.
All rows should still have data after the removal of duplicates.
So my question is this: how can I ensure that the removal of duplicates (based on column A) is applied to the whole block of data?
ie all columns?
What would I need to change in this line of the code, please? 'Columns("A").RemoveDuplicates Columns:=1, Header:=xlNo
Thanks in advance.
I have a macro where
I paste data into 5 columns (A:E) in a tab. Then filter by the N's in column E, then remove the duplicate values in column A.
However, I've noticed the removing of duplicates isn't working, as expected.
It removes duplicates in column A, which results in several rows at the bottom of column A being blank, whilst the correspoding rows in columns B:E still have data.
All rows should still have data after the removal of duplicates.
So my question is this: how can I ensure that the removal of duplicates (based on column A) is applied to the whole block of data?
ie all columns?
What would I need to change in this line of the code, please? 'Columns("A").RemoveDuplicates Columns:=1, Header:=xlNo
Thanks in advance.
VBA Code:
With ActiveSheet
.Range("A1:E1").AutoFilter 5, "N"
'.AutoFilter.Range.Offset(1).EntireRow.Select
'.AutoFilterMode = False
End With
'remove the dupes in column A
'Columns("A").RemoveDuplicates Columns:=1, Header:=xlNo