+ Reply to Thread
Results 1 to 8 of 8

VB Code to filter data and copy paste in another sheet

  1. #1
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    VB Code to filter data and copy paste in another sheet

    Hello:

    Please refer to attached file.
    Have data as shown in Sheet1
    I need to filter the data in sheet2 with date given is sheet2 cell B1 and vendor in cell A2

    Result needs to be as shown in Sheet2.

    Let me know if you have any questions.
    Thanks.

    R
    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

    Re: VB Code to filter data and copy paste in another sheet

    Hi !

    The very beginner easy way is an advanced filter but you have to put headers in Sheet2 A1:B1, data to search in A2:B2
    then the code needs only a single codeline as you can see in the VBA inner help of the AdvancedFilter method …

  3. #3
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: VB Code to filter data and copy paste in another sheet

    Maybe :
    Please Login or Register  to view this content.
    1. I care dog
    2. I am a loop maniac
    3. Forum rules link : Click here
    3.33. Don't forget to mark the thread as solved, this is important

  4. #4
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: VB Code to filter data and copy paste in another sheet

    Set up the Criteria range as Marc stated and try this...
    Please Login or Register  to view this content.

  5. #5
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: VB Code to filter data and copy paste in another sheet

    Hello:

    Thanks to all , works for me

    R

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

    Cool Advanced filter with matching headers


    As a beginner starter :

    PHP Code: 
    Sheet1.UsedRange.Advancedfilter xlFilterCopySheet2.[A1:B2], Sheet2.[A4:L4
    Do you like it ? So thanks to click on bottom left star icon « Add Reputation » !

  7. #7
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: VB Code to filter data and copy paste in another sheet

    You are welcome, thanks for marking the thread as solved and rep.points.

    Regards

  8. #8
    Registered User
    Join Date
    03-17-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: VB Code to filter data and copy paste in another sheet

    Thank you, good to learn somthing every day :D

+ 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 for auto filter, copy, paste and save to new sheet
    By Hanky in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-22-2018, 07:19 AM
  2. [SOLVED] Code to filter and copy paste data
    By arun.sj in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-22-2015, 08:44 AM
  3. Filter copy paste data based on sheet name
    By kannan1847 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-31-2015, 01:58 PM
  4. VBA Code to filter,Copy and Paste data from one sheet to the other
    By aravindkm in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-18-2013, 03:39 PM
  5. VB code to filter copy and paste in a different sheet
    By rshnkmr39 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-26-2013, 12:53 AM
  6. VBA code need for advance filter non blank cells, paste data to another sheet
    By krjoshi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-08-2012, 12:15 PM
  7. how to filter and copy data from one sheet and paste to new worksheet
    By mr_asrul in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-03-2008, 07:15 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