Results 1 to 4 of 4

Copy Filtered Data on visible rows

Threaded View

jamesbrightwell Copy Filtered Data on visible... 02-24-2015, 04:35 PM
xladept Re: Copy Filtered Data on... 02-24-2015, 06:39 PM
jamesbrightwell Re: Copy Filtered Data on... 02-24-2015, 09:27 PM
xladept Re: Copy Filtered Data on... 02-25-2015, 01:31 AM
  1. #1
    Registered User
    Join Date
    02-23-2015
    Location
    Calgary
    MS-Off Ver
    Office 2010
    Posts
    8

    Copy Filtered Data on visible rows

    Hello,

    I have another problem I am not sure is possible to code around. I filter my list sometimes more than a million rows and filter out certain criteria. Then I want to copy just the visible data which is the filtered data and paste it into another sheet. The problem is the data is so large I keep getting errors. I tried to reduce the data size and address it in chunks of 100,000 lines and do it 10 times but it is insanely slow and there has to be a better way right? This is the code I am using...

    '1st portion
    Sheets("RAW").Select
    Range("A2:Q1048576").Select
    Dim rng1 As Range
    Set rng1 = Application.Intersect(ActiveSheet.UsedRange, Range("A2:Q100000"))
    rng1.SpecialCells(xlCellTypeVisible).Select
    Selection.Copy
    Sheets("Format").Select
    Range("A2").Select
    ActiveSheet.Paste
    '2nd portion
    Sheets("RAW").Select
    Range("A2:Q1048576").Select
    Dim rng2 As Range
    Set rng2 = Application.Intersect(ActiveSheet.UsedRange, Range("A100001:Q200000"))
    rng2.SpecialCells(xlCellTypeVisible).Select
    Selection.Copy
    Sheets("Format").Select
    Range("A2").Select
    Selection.End(xlDown).Select
    ActiveCell.Offset(1, 0).Select
    ActiveCell.Select
    ActiveSheet.Paste
    Application.CutCopyMode = False
    Range("A2").Select
    I have updated with code tags and the code does work but it takes close to 10 mins to run, I was wondering if I am doing it a really slow way and if it could be faster?
    Last edited by jamesbrightwell; 02-24-2015 at 09:27 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Macro to select visible rows containg data in filtered list
    By knevil in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-15-2013, 01:22 PM
  2. [SOLVED] Macro: Copy text values of Visible cells (on a FILTERED data)
    By rampal in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-24-2013, 06:12 AM
  3. Excel VBA to copy visible filtered data from from one worksheet to another
    By rahul1023 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-22-2013, 09:00 PM
  4. [SOLVED] Data Validation - using visible rows from filtered list
    By anandvh in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-17-2012, 06:14 PM
  5. Excel 2007 : Copy Visible Filtered Rows between worksheets
    By lmsexcelforum in forum Excel General
    Replies: 0
    Last Post: 05-17-2009, 12:40 PM

Tags for this Thread

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