+ Reply to Thread
Results 1 to 2 of 2

Create range consisting only of autofilter results.

Hybrid View

  1. #1
    Registered User
    Join Date
    08-23-2014
    Location
    Boston
    MS-Off Ver
    2013
    Posts
    5

    Create range consisting only of autofilter results.

    Hi,

    Say I run an autofilter and 4/1000 rows become visible. I want to extract data from these rows. I have been using copy visible and paste in order to select data in the filter result rows, but lately I've noticed running this macro on different machines and running it too many times on my machine causes a problem with the cut and paste clipboard.

    The last 2 columns are omitted in the paste. This is a problem in and of itself but I need help with the solution - skip the copy and paste and name the visible cells as a range.

    Say: 1248 entry rows are occupied. After filter, 2 rows are visible and only these rows are selected... what can I do at this point other than copying and pasting these rows elsewhere? Naming the selection a range creates a range that includes invisible cells.

    Thank you!

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Create range consisting only of autofilter results.

    Set r = ActiveSheet.Range("a1:c100").SpecialCells(xlCellTypeVisible)
    r.Copy Destination:=Range("t1")
    Hope this helps

    Sometimes its best to start at the beginning and learn VBA & Excel.

    Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
    Available for remote consultancy work PM me

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Refer to cells in the range consisting of non-adjacent cells
    By dmitry in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-04-2011, 10:48 AM
  2. AutoFilter method of Range class failed - Yet autofilter works.
    By Carlsbergen in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-25-2009, 05:43 PM
  3. Assign Autofilter Results to a Range object
    By ShredDude in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 12-06-2008, 10:08 PM
  4. create sheet from autofilter results
    By umba-sr in forum Excel General
    Replies: 1
    Last Post: 02-21-2006, 09:35 AM
  5. [SOLVED] A range variable consisting of multiple ranges.
    By cpeters5@yahoo.com in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-04-2005, 05:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1