alpha_xero
New Member
- Joined
- Sep 14, 2022
- Messages
- 6
- Office Version
- 2021
- 2019
- 2016
- Platform
- Windows
Hello,
I have a code that returns unique rows from one sheet to another.
I want to exclude specific columns from the range from B5:P1048576 and show them in Sheets("Item-Wise Summary").Range("A5:O5")
I have a code that returns unique rows from one sheet to another.
I want to exclude specific columns from the range from B5:P1048576 and show them in Sheets("Item-Wise Summary").Range("A5:O5")
VBA Code:
Sub RemoveDuplicates()
Dim rngDatabase As Range
'define the database
Set rngDatabase = Sheets("Transaction Entry").Range("B5:P1048576")
'filter the database to a new range with a unique set to true
rngDatabase.AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Sheets("Item-Wise Summary").Range("A5:O5"), Unique:=True
End Sub