Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Copying a Filtered Range from a Sheet in another Workbook

I am afraid I am back again with another request but I know I am in good
hands.

This time what I am looking for is a snip of VBA Code to allow me (in a code
module) to set up either a filter or use the autofilter in a second workbook
then apply a filter using the Combo Box type arrows. Lets say it is
filtering "Yes" I would then like to copy the selection and paste back into
my original workbook. The Range to be Selected can be any size and will
sometimes grow or shrink. I am actually trying to build myself a Wizard and
this is one of the steps I need to cover.

If I apply this filter manually using the autofilter method I notice that
the first row in the filtered selection is 'say' Row 21, how do I set up the
copy to know it should start at Row 21 and Select only the Rows which have
been filtered bearing in mind these become quite Random. Is there an in
built VBA Method / Property I can use to do this with.


Regards Fred


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 52
Default Copying a Filtered Range from a Sheet in another Workbook

There's some code to copy the filtered range on the following page:

http://www.contextures.com/xlautofilter03.html#Copy

Frederick wrote:
I am afraid I am back again with another request but I know I am in good
hands.

This time what I am looking for is a snip of VBA Code to allow me (in a code
module) to set up either a filter or use the autofilter in a second workbook
then apply a filter using the Combo Box type arrows. Lets say it is
filtering "Yes" I would then like to copy the selection and paste back into
my original workbook. The Range to be Selected can be any size and will
sometimes grow or shrink. I am actually trying to build myself a Wizard and
this is one of the steps I need to cover.

If I apply this filter manually using the autofilter method I notice that
the first row in the filtered selection is 'say' Row 21, how do I set up the
copy to know it should start at Row 21 and Select only the Rows which have
been filtered bearing in mind these become quite Random. Is there an in
built VBA Method / Property I can use to do this with.


--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Copying a Filtered Range from a Sheet in another Workbook

Further to my previous post I forgot to mention the Sheet being filtered in
the other worksheet starts at Row 4 because information above this is for
Colum Headers etc.
"Frederick" wrote in message
...
I am afraid I am back again with another request but I know I am in good
hands.

This time what I am looking for is a snip of VBA Code to allow me (in a

code
module) to set up either a filter or use the autofilter in a second

workbook
then apply a filter using the Combo Box type arrows. Lets say it is
filtering "Yes" I would then like to copy the selection and paste back

into
my original workbook. The Range to be Selected can be any size and will
sometimes grow or shrink. I am actually trying to build myself a Wizard

and
this is one of the steps I need to cover.

If I apply this filter manually using the autofilter method I notice that
the first row in the filtered selection is 'say' Row 21, how do I set up

the
copy to know it should start at Row 21 and Select only the Rows which have
been filtered bearing in mind these become quite Random. Is there an in
built VBA Method / Property I can use to do this with.


Regards Fred




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
Paste Filtered Range to New Workbook- AS andiam24 Excel Discussion (Misc queries) 2 December 10th 09 01:20 AM
Excel 2007 - copying filtered data to another workbook texansgal Excel Worksheet Functions 1 June 15th 09 11:05 PM
copying one sheet to another workbook boschuster50 Excel Discussion (Misc queries) 3 April 30th 09 10:40 PM
Trasnsposing or copying filtered data from one sheet to another Sierras Excel Worksheet Functions 1 January 14th 06 05:24 PM
Paste range of values into filtered sheet ken2005 Excel Discussion (Misc queries) 3 October 3rd 05 11:22 AM


All times are GMT +1. The time now is 04:26 PM.

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

About Us

"It's about Microsoft Excel"