Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Your code tells it to only use column B. Tell it to use the whole table:
Sheets("Stepdown").Select range("B1").CurrentRegion.AdvancedFilter _ Action:=xlFilterCopy, _ CopyToRange:=Worksheets("Stepdown2") _ .Range("A1"), Unique:=True Obviously I can't see your sheet or know how your data is laid out. so you substitute in the best way to get the "table" or what you want treated as a table. However, note that if you only want rows that are unique with respect to column B, then you would need to filter in place, then copy Dim rng as Range, rng1 as Range Sheets("Stepdown").Select Columns("B:B").AdvancedFilter _ Action:=xlFilterInPlace, _ Unique:=True set rng = Columns("B:B").SpecialCells(xlVisible) set rng1 = Intersect(Range("b1").CurrentRegion, rng.Entirerow) rng1.copy Destination:=Worksheets("Stepdown2") _ .Range("A1") -- Regards, Tom Ogilvy "scrabtree" wrote in message ... Sheets("Stepdown").Select Columns("B:B").AdvancedFilter _ Action:=xlFilterCopy, _ CopyToRange:=Worksheets("Stepdown2") _ .Range("A1"), Unique:=True This only copied Column B:B to the Stepdown2 sheet. I wanted the whole table copied not just column B:B? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Another Error Cont' | New Users to Excel | |||
password for worksheets cont... | Excel Worksheet Functions | |||
edit hyperlink code cont from 12/8/04 | Excel Discussion (Misc queries) | |||
How To Finish pivot table refresh before cont. VBA code | Excel Programming | |||
Time Capture cont... | Excel Programming |