+ Reply to Thread
Results 1 to 6 of 6

Copy paste filtered range with criteria using VBA

  1. #1
    Registered User
    Join Date
    07-30-2010
    Location
    Dubai
    MS-Off Ver
    Excel 2019
    Posts
    48

    Copy paste filtered range with criteria using VBA

    I have two sheets interface and database

    What i need to do is extract 6 columns viz


    Supplier Name / Origin / Ordered by / Inv Type / Bank / LC opened Amount


    in the interface sheet from the database sheet

     
    There are two option buttons

    Order placed and Tr maturities post which the user can select related respective months

    based on the month selected starting and ending date shall form the criteria for the month to be filtered

    if the user selects order placed the column which needs to be filtered is column G (Rqst date ) in the database sheet , and above 6 column needs to be filtered / copied and then pasted in the interface sheet


    if the user selects TR maturities the column which needs to be filtered is column Z (TR month ), and above 6 column needs to be filtered / copied and then pasted in the interface sheet

    I have done the same with formulas in the attached sheet , the problem is as the data grows , the sheet will become dead slow , request some one to please help me with a VBA code in doing this

    I am attaching the file for easy reference


    regards
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Copy paste filtered range with criteria using VBA

    hi Jayant shettigar, option, please check attachment
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    07-30-2010
    Location
    Dubai
    MS-Off Ver
    Excel 2019
    Posts
    48

    Re: Copy paste filtered range with criteria using VBA

    Quote Originally Posted by watersev View Post
    hi Jayant shettigar, option, please check attachment
    Sir

    Amazing that is exactly what I wanted , a small problem being it clears all the contents of columns on its left hand side where currently I have set data for data validation. G10 to I22

    Cant the code just clear the table range say S12 to x1000 while displaying the output

    also along with the existing filter, I want to add one more filter say ordered by which is in cell x10 in the interface sheet

    I am adding the sheet for you reference

    I really appreciate for your efforts in devoting your valuable time and responding god bless



    regards
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Copy paste filtered range with criteria using VBA

    the code would clear only S12:X... range on Interface sheet. The rest from your post requires further explanations.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    07-30-2010
    Location
    Dubai
    MS-Off Ver
    Excel 2019
    Posts
    48

    Re: Copy paste filtered range with criteria using VBA

    Sir
    My sincere apologies if i was not clear in explaining , if you refer the order monitor_1 file which i have attached in my second reply clearly shows that when i run the code given by you month details being used for data validation gets deleted , post which we cannot select any other months

    Kindly refer the order monitor_1 file

    the same file also explains the additional condition which needs to be incorporated in the VBA code
    Thanks

  6. #6
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Copy paste filtered range with criteria using VBA

    file in post #4 has corrected code which deletes only result data in S:X columns.

    File from your post #3 does not explain anything to me, sorry

+ 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 paste macros
    By rrk2008 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-31-2014, 06:42 AM
  2. [SOLVED] Copy/Paste from a Filtered Range and Insert copied data NOT overwrite
    By Simon.Ward in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 06-12-2013, 11:14 AM
  3. Replies: 4
    Last Post: 08-16-2012, 06:20 PM
  4. Copy/Paste Range to Another Range based on Criteria
    By ExcelFinWizzard in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-13-2012, 09:35 AM
  5. Auto Copy & Paste Range Based on Criteria
    By dreicer_Jarr in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-28-2012, 04:00 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