View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bruce Cooley Bruce Cooley is offline
external usenet poster
 
Posts: 11
Default Cut and Paste after Auto FIlter

Using your approach, once your top left data cell is selected you could go
up to the header line, end-right, down one row, and end-down and there you
should be at the bottom right of your filtered data, assuming the far right
column has no missing values. However, this is not fool-proof, and the
macro recorder is by no means the best approach to coding this. If I had
more time right now I would look into it more. See if this works for you.

Range(Selection, Selection.End(xlUp)).Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy

Bruce Cooley


"David Dean" wrote in message
...
: I've created a database with 10 columns and about 500
: lines. I autofilter based on a value in column 10 and
: want to copy and paste the data (do not want the header
: copied). The autofilter first selected ciriteria is line
: 114 (this can change from month to month). I tried to do
: a copy end down end right using recording a new maco,
: unfortunately because one of the columns in the first line
: of the database is empty, I am not copying all the data
: that I need. The end right is only going to open column
: in the second line of the database (which is NOT included
: in the autofilter). How do I modify the macro code to
: work around this issue?
:
: Thanks