+ Reply to Thread
Results 1 to 2 of 2

Using array to make 'for' loop more efficient

  1. #1
    Registered User
    Join Date
    08-31-2012
    Location
    HK
    MS-Off Ver
    Excel 2003
    Posts
    14

    Using array to make 'for' loop more efficient

    hi all!

    i have a workbook (redacted) attached that:

    1. takes user input on Sheets("Input")

    Please Login or Register  to view this content.
    2. takes list of trades from Sheets("Data")

    3. pastes list on Sheets("Output") then loops through and deletes irrelevant trades (deleting rows where column A != BK OR left(3) of column C != ST)

    Please Login or Register  to view this content.
    so we only want to be left with trades that match both BK and ST

    there are typically ~62k rows of trades and the loop/delete row process is very slow...i've read about ways to increase the efficiency of this process using an array but don't quite understand how to execute this. any pointers?

    cheers

    sampleSS.xlsx

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,454

    Re: Using array to make 'for' loop more efficient

    Hi,

    Perhaps you could do this by filtering the "Data" sheet before copying and pasting..

    Please Login or Register  to view this content.
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

+ 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. Replies: 2
    Last Post: 08-12-2014, 12:56 PM
  2. [SOLVED] Make large chunk of If statements efficient. Array maybe?
    By mdovey in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 04-20-2014, 11:32 AM
  3. how to make reconciliations more efficient
    By zazzz in forum Excel General
    Replies: 5
    Last Post: 07-22-2013, 09:38 AM
  4. [SOLVED] How can I make this code more efficient?
    By Mr.Whiskers in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-09-2012, 11:11 PM
  5. How to make VBA code more efficient?
    By globulous in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-14-2010, 12:02 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