+ Reply to Thread
Results 1 to 4 of 4

Sort Data based on Criteria and CopyPaste to another worksheet

Hybrid View

HowieD Sort Data based on Criteria... 08-01-2013, 06:37 PM
austin221871 Re: Sort Data based on... 08-01-2013, 07:33 PM
AB33 Re: Sort Data based on... 08-02-2013, 05:41 AM
HowieD Re: Sort Data based on... 08-04-2013, 10:54 AM
  1. #1
    Registered User
    Join Date
    08-01-2013
    Location
    Rexburg, Idaho
    MS-Off Ver
    Excel 2010
    Posts
    4

    Sort Data based on Criteria and CopyPaste to another worksheet

    Hi there,

    I am having trouble sorting data based on a cell value and then copying that data to another worksheet. I have a list of information on Sheet1 that needs to be transferred to another worksheet. However, the only data I wish to have transferred is the data in the row with the value TRUE in Column U. I need this to copy to the next blank row on Sheet2. Both Sheet1 and Sheet2 have headers. I have attached a simplified version of my workbook. Any help is greatly appreciated. The end goal of this list is to create an archive.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    07-30-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Sort Data based on Criteria and CopyPaste to another worksheet

    This will only do it for the first 500 rows if you do it for all it takes a wile to run
    Sub filter()
    Dim lr As Long
    
    Sheets("Sheet1").Activate
    ActiveSheet.Range("U2").AutoFilter Field:=21, Criteria1:="TRUE"
    
    lr = Sheets("Sheet1").UsedRange.Rows.Count
    
    Range("A1:U500").SpecialCells(xlCellTypeVisible).Select
    
    Selection.Copy Sheets("Sheet2").Range("A1")
    
    Range("A1").Select
    
    Sheets("Sheet1").Range("U2").AutoFilter Field:=21
    
    End Sub

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Sort Data based on Criteria and CopyPaste to another worksheet

    Try the attached.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    08-01-2013
    Location
    Rexburg, Idaho
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Sort Data based on Criteria and CopyPaste to another worksheet

    Thank you both so much for the help. AB33 I ended up using your code it works perfectly!!

+ 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. Replies: 7
    Last Post: 05-22-2013, 04:45 PM
  2. Sort list of data taken from another source based on certain criteria
    By Scott_88 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-28-2013, 10:19 AM
  3. Need to sort data based on criteria, and specific format
    By wparker80 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-05-2012, 05:16 PM
  4. Sort data to separate sheets based on criteria
    By kmahan71 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 10-11-2012, 05:03 PM
  5. Macro to copy worksheet data to another worksheet based on criteria
    By excelvb in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-07-2011, 04:11 AM

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