+ Reply to Thread
Results 1 to 6 of 6

VBA macros to auto filter copy and past the data by column

  1. #1
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    VBA macros to auto filter copy and past the data by column

    Hello again,

    I am looking for a V.BA Macros to auto Filter data in column A and past in worksheet("datasheet") by column.

    copy of the sample sheathes attached for your refference
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Cool Hi ! Try this ‼


    As a beginner starter paste this demonstration to the Dashboard worksheet module :

    PHP Code: 
    Sub Demo1()
         
    Dim C%, Rg As RangeH%, Rk As RangeR&
             
    1
             Me
    .UsedRange.Clear
             Application
    .ScreenUpdating False
        With Sheets
    ("ST")
            .[
    A1].AutoFilter
             Set Rg 
    = .[A1].CurrentRegion
             H 
    Rg.Columns.Count 1
             Set Rk 
    = .Cells(2)
        
    End With
            Rg
    .Columns(1).AdvancedFilter xlFilterCopy, , RkTrue
        
    For 2 To Rk.CurrentRegion.Rows.Count 1
            Rg
    .AdvancedFilter xlFilterCopyRk.Resize(2), Cells(C)
            
    Rk(1).Copy Rk(2)
            
    H
        Next
            Rk
    .CurrentRegion.Clear
            Set Rg 
    Nothing:   Set Rk Nothing
            Application
    .ScreenUpdating True
    End Sub 
    Do you like it ? So thanks to click on bottom left star icon « Add Reputation » !

  3. #3
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Re: VBA macros to auto filter copy and past the data by column

    Thanks marcl,

    1 last requirement. Can v copy only first 10 rows if the data is more than 10 rows.

    Thanks for ur help

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: VBA macros to auto filter copy and past the data by column

    Please Login or Register  to view this content.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  5. #5
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Re: VBA macros to auto filter copy and past the data by column

    Thanks both of u it us working as i expected.
    Topic marked as closed and reputation added to both of u.

  6. #6
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: VBA macros to auto filter copy and past the data by column

    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    Thanks.gif

+ 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. VBA Code to Copy Data From Last Row Based on A Value and Past into Blank Column
    By jgarza0422 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-19-2019, 09:12 AM
  2. Copy value of one cell and past in new column only where data exists
    By MikeWaring in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-24-2017, 11:00 AM
  3. Apply auto filter and copy data one below other
    By Andy308 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-10-2016, 09:05 AM
  4. [SOLVED] Copy data from fillable user form to database tab in column format/recall past records
    By johnstevens in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 06-13-2014, 01:28 PM
  5. Macro to Set Filter and Copy past
    By srikanthbenoni in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-28-2012, 08:02 AM
  6. Copy/paste past protection and macros
    By jomili in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-17-2011, 12:41 PM
  7. auto copy and past
    By cdixon in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 01-23-2006, 11:55 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