+ Reply to Thread
Results 1 to 4 of 4

Look for a quicker code to replace this loop approach

  1. #1
    Forum Contributor
    Join Date
    01-15-2013
    Location
    London
    MS-Off Ver
    Excel 2003, 2007, 2010, 2019
    Posts
    436

    Look for a quicker code to replace this loop approach

    Hello everyone,

    My code below is to extract rows in sheet 1 to sheet 2 with the inefficient loop. The condition is to check if the date matches (as shown below).

    Is it possible to use something like AutoFilter to improve the efficiency? Thanks.

    Please Login or Register  to view this content.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,485

    Re: Look for a quicker code to replace this loop approach

    Sure try this,
    Adjust sheet names and ranges as required.

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    01-15-2013
    Location
    London
    MS-Off Ver
    Excel 2003, 2007, 2010, 2019
    Posts
    436

    Re: Look for a quicker code to replace this loop approach

    Many thanks, davesexcel.

    For the criteria, I need to find the previous month end date first based on the cell value and from there to check:

    Please Login or Register  to view this content.
    Can AutoFilter handle this?

    Thanks again.

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,485

    Re: Look for a quicker code to replace this loop approach

    Attaching a sample workbook enables others to work on your problem:

    To attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include BEFORE/AFTER sheets if needed to show the process you're trying to complete or automate. Remember to desensitize the data.

    Click on GO ADVANCED and click "manage attachments" to open the upload window.



    To add a file to a post

+ 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. [SOLVED] Looking for quicker code, in this VBA example
    By deek in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-11-2016, 04:22 PM
  2. Can this code be quicker?
    By demarc in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-09-2016, 10:26 AM
  3. [SOLVED] Quicker way to loop than using Do Until and Activate
    By starcraftbud in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-24-2015, 03:49 PM
  4. Need Help on how to approach a possible if then loop
    By noggles301 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-19-2014, 08:45 PM
  5. A quicker way to use a loop
    By bkeat in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-08-2014, 11:57 AM
  6. Quicker way to loop through WorksheetFunction?
    By newbi004 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-07-2013, 05:11 AM
  7. [SOLVED] Help for v-lookup approach instead of manually cell linking approach - Excel 2010
    By Mirisage in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-31-2013, 01:32 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