BPW
New Member
- Joined
- Mar 7, 2013
- Messages
- 31
- Office Version
- 365
- Platform
- Windows
Hi Everyone,
I'm stuck and need a little guidance. I'm attempting to copy unique values within a column of one worksheet and paste them within another worksheet (same workbook) retaining the destination sheet's formatting. Below is the VBA that pastes over the formatting.
Thanks in advance!
BPW
I'm stuck and need a little guidance. I'm attempting to copy unique values within a column of one worksheet and paste them within another worksheet (same workbook) retaining the destination sheet's formatting. Below is the VBA that pastes over the formatting.
VBA Code:
Sub CreateUniqueList2()
Dim ws1 As Worksheet, ws2 As Worksheet
Set ws1 = Worksheets("Data Dump")
Set ws2 = Worksheets("rollups")
Dim lastrow As Long
lastrow = Cells(Rows.Count, "B").End(xlUp).Row
ws1.Activate
ws1.Range("B3:B" & lastrow).AdvancedFilter _
Action:=xlFilterCopy, _
CopyToRange:=ws2.Range("b4"), _
Unique:=True
End Sub
Thanks in advance!
BPW