Results 1 to 5 of 5

VBA to filter top ten values then paste into the related tables

Threaded View

  1. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: VBA to filter top ten values then paste into the related tables

    Sub test()
        With Sheets("sheet2").Cells(1).CurrentRegion
            .Parent.AutoFilterMode = False
            .AutoFilter 5, , 3
            .Offset(1).Resize(, .Columns.Count - 2).Copy Sheets("sheet1").Range("c8")
            With Sheets("sheet1").Range("c8:g17")
                .Sort .Cells(1, 5), 2
            End With
            .AutoFilter
            .AutoFilter 7, , 3
            With .Offset(1)
                Union(.Columns("a:d"), .Columns("f:g")).Copy Sheets("sheet1").Range("c21")
            End With
            With Sheets("sheet1").Range("c21:h30")
                .Sort .Cells(1, 6), 2
            End With
            .AutoFilter
        End With
    End Sub
    Last edited by jindon; 02-22-2018 at 08:33 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. I want to extend related tables that have related formulas
    By earlyyyyyy in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-10-2015, 10:08 AM
  2. filter values out of pivot tables
    By ammartino44 in forum Excel General
    Replies: 0
    Last Post: 01-22-2015, 03:18 PM
  3. Macro to Filter, Select, Copy, Paste (Baseball Related)
    By tdxls in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-24-2013, 05:38 AM
  4. [SOLVED] Two related tables
    By gerainta in forum Excel General
    Replies: 3
    Last Post: 05-15-2012, 05:59 AM
  5. Replies: 0
    Last Post: 07-21-2010, 01:43 PM
  6. Filter Pivot Tables By Values
    By Raoul Duke in forum Excel General
    Replies: 4
    Last Post: 02-16-2010, 08:25 AM
  7. Excel 2007 : Paste Special Values for Pivot Tables
    By PaulTaylor in forum Excel General
    Replies: 16
    Last Post: 08-11-2009, 05:07 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