+ Reply to Thread
Results 1 to 3 of 3

Copy last 100 data points from table 1 to another worksheet based on criteria w VBA

  1. #1
    Registered User
    Join Date
    03-11-2017
    Location
    Oregon
    MS-Off Ver
    2013
    Posts
    4

    Copy last 100 data points from table 1 to another worksheet based on criteria w VBA

    Sorry I cannot get super specific with the worksheet, there is some confidential information in it, but essentially I have to keep a record of data points that are tied to different categories. I have to report on them weekly by category with the last 100 data points in each. I would like to ease the process of copying and pasting the last 100 points into the calculation sheet, or using pivot tables.


    For the attached sample spreadsheet, how would i go about finding the most recent (based on date) 4 occurrences of the TL category, and copy the needed columns into the sheet 2 table?

    Sorry just noticed DMC on sheet2 is ppm
    Attached Files Attached Files
    Last edited by bhart24; 05-20-2020 at 07:09 PM.

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Copy last 100 data points from table 1 to another worksheet based on criteria

    E19 =IF(COUNTIF($A$19:$A19,$A19)<=4,COUNTIF($A$19:$A19,A19),"") and drag up.


    After that a pivot table.

    See the attached file.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    03-11-2017
    Location
    Oregon
    MS-Off Ver
    2013
    Posts
    4
    Quote Originally Posted by oeldere View Post
    E19 =IF(COUNTIF($A$19:$A19,$A19)<=4,COUNTIF($A$19:$A19,A19),"") and drag up.


    After that a pivot table.

    See the attached file.
    Sorry I wanted to do it in VBA to keep it more secured. Should have clarified.

+ 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. Copy data from one worksheet to another based on criteria
    By jlw8201 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-12-2019, 03:56 PM
  2. Replies: 1
    Last Post: 03-15-2017, 09:44 AM
  3. [SOLVED] Copy data from one worksheet to another worksheet based on criteria
    By kunal Shah in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-15-2015, 05:13 AM
  4. [SOLVED] Copy data from one worksheet to another worksheet based on criteria
    By kunal Shah in forum Excel General
    Replies: 2
    Last Post: 10-14-2015, 06:22 AM
  5. Copy data from one worksheet to another one based two criteria
    By lagacey in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-07-2011, 12:12 PM
  6. Copy data from worksheet based on certain criteria
    By excelvb in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-08-2011, 12:34 PM
  7. 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