+ Reply to Thread
Results 1 to 4 of 4

Easiest way of working through large array

  1. #1
    Registered User
    Join Date
    04-21-2015
    Location
    Amsterdam
    MS-Off Ver
    2010
    Posts
    6

    Easiest way of working through large array

    Dear,

    I have to search through a big array where I specifically need an amount of rows where a specific column contains some data.

    The variant array is about 1900*1000 (rows * columns) big. In column 4 are the drawing numbers.. (e.g. DR0002, DR0003, DR0004).

    For instance: I only need all the row (numbers) where the row in column 4 contains DR0002 (these are like 4% of all the rows).

    My solution: Loop through every row the array in column 4 and do a Strcompare with 'DR0002'.

    But looping through all the values is wrong and slow I reckon.. Any suggestions?

    Kind Regards,

    Bas

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Easiest way of working through large array

    Are you looping through an Array or a Range? There's nothing wrong with looping through an array, only looping through a range

  3. #3
    Registered User
    Join Date
    04-21-2015
    Location
    Amsterdam
    MS-Off Ver
    2010
    Posts
    6

    Re: Easiest way of working through large array

    Looping through an array:

    Please Login or Register  to view this content.
    So this is not wrong? Or inefficient?
    It works pretty quick (especially compared to before, I was looping through the sheet!)

    Thanks for your reply Kyle123!
    Last edited by bastord; 05-07-2015 at 04:02 AM.

  4. #4
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Easiest way of working through large array

    That's fine, looping through an array is pretty quick it's also easy to understand. It's looping through Ranges/Cells that's slow - pretty much any interaction with the worksheet is slow, a loop especially so as you interact with it multiple times

+ 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] Long array formula with INDEX and MATCH quits working when range is too large
    By UncleKevy in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-05-2013, 09:42 PM
  2. Large of a Date Array only working with nested IF, not AND
    By Matt_ in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-08-2013, 09:21 PM
  3. Replies: 0
    Last Post: 05-21-2012, 04:03 AM
  4. Transferring part of a large array to smaller array
    By Xrull in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-26-2011, 09:39 AM
  5. Easiest one-cell formula for multiplying array elements
    By kayard in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-27-2008, 03:55 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