Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default code help cont.

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Another Error Cont' DavidB New Users to Excel 6 November 23rd 06 01:52 AM
password for worksheets cont... Brad Excel Worksheet Functions 1 January 20th 05 04:19 PM
edit hyperlink code cont from 12/8/04 doug Excel Discussion (Misc queries) 4 December 17th 04 11:51 PM
How To Finish pivot table refresh before cont. VBA code graham Excel Programming 0 June 24th 04 06:22 AM
Time Capture cont... Gordon Cartwright[_2_] Excel Programming 1 November 19th 03 01:24 AM


All times are GMT +1. The time now is 05:35 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"