+ Reply to Thread
Results 1 to 4 of 4

Extracting rows from a table.

Hybrid View

dcgrove Extracting rows from a table. 10-02-2015, 09:46 AM
Vidya Palani Re: Extracting rows from a... 10-02-2015, 12:02 PM
dcgrove Re: Extracting rows from a... 10-02-2015, 01:44 PM
Vidya Palani Re: Extracting rows from a... 10-03-2015, 01:37 AM
  1. #1
    Forum Contributor
    Join Date
    02-16-2008
    Location
    Mansfield, TX
    Posts
    324

    Extracting rows from a table.

    Hello, the data set in the linked file contains audits performed. My end goal is to have a separate sheet that contains the audits that score less than 66 and the reaudits that occur after the initial <66 score. If a unit scores less than 66, they will be reaudited any number of times until they score greater than 66. The "Vst" column indicates the type of audit each row is. "1" signifies an initial audit, with anything greater than 1 a reaudit. I need the entire row on the new sheet. What's the best way to accomplish this?

    https://dl.dropboxusercontent.com/u/...xtraction.xlsx

    Thanks for any help you can provide!

    Clayton

  2. #2
    Registered User
    Join Date
    10-10-2014
    Location
    India
    MS-Off Ver
    2010
    Posts
    41

    Re: Extracting rows from a table.

    Let me know if this helps.

    Sub test()
    ActiveSheet.AutoFilterMode = False
    Range("A1:D10000").AutoFilter
    Range("A1:D10000").AutoFilter Field:=4, Criteria1:="<66"
    Range(Range("a1"), Range("A1").End(xlToRight).End(xlDown)).Select
    Selection.Copy
    Sheets.Add
    ActiveSheet.Paste
    End Sub
    Vidya Palani

  3. #3
    Forum Contributor
    Join Date
    02-16-2008
    Location
    Mansfield, TX
    Posts
    324

    Re: Extracting rows from a table.

    That pulls the the audits that score less than 66, but does not pull the reaudits that occur afterwards. Thanks for giving it a shot though!

  4. #4
    Registered User
    Join Date
    10-10-2014
    Location
    India
    MS-Off Ver
    2010
    Posts
    41

    Re: Extracting rows from a table.

    This extracts the rows with audit scores less than 66 and all the rows for which reaudits has happened. Is this what you need?

    Sub test()
    ActiveSheet.AutoFilterMode = False
    Range("A1:D10000").AutoFilter
    Range("A1:D10000").AutoFilter Field:=4, Criteria1:="<66"
    Range(Range("A1"), Range("A1").End(xlToRight).End(xlDown)).Select
    Selection.Copy
    Sheets.Add
    ActiveSheet.Name = "Data Extract"
    ActiveSheet.Paste
    Sheets("Data").Activate
    Range("A1:D10000").AutoFilter Field:=3, Criteria1:=">1"
    Range(Range("A2"), Range("A2").End(xlToRight).End(xlDown)).Select
    Selection.Copy
    Sheets("Data Extract").Select
    Range("a1").End(xlDown).Offset(1, 0).Select
    ActiveSheet.Paste
    Sheets("Data").AutoFilterMode = False
    Sheets("Data").Range("A1").Select
    Sheets("Data Extract").Range("A1").Select
    End Sub

+ 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. [SOLVED] Extracting from table based on criteria and auto delete rows after 4 days from database
    By ACALEX in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-18-2014, 10:33 AM
  2. Extracting Unique cell value from a table containing 2 rows and 2 columns
    By amitnbhatia in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-30-2013, 01:13 AM
  3. [SOLVED] Extracting rows into a self-populating table on another worksheet - please help!
    By mcpoogle in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-16-2013, 08:48 AM
  4. extracting rows of data from a table that are met by criteria in two separate columns
    By markhocek in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-12-2013, 03:20 AM
  5. Extracting unique entries from table with multiple rows and columns
    By Bonnister in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-04-2012, 11:48 AM
  6. Replies: 6
    Last Post: 08-18-2012, 05:00 AM
  7. Extracting data from a pivot table into rows
    By Jordan in forum Excel General
    Replies: 4
    Last Post: 01-22-2012, 12:38 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