LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 55
Default application.match with multi-dimensional arrays (syntax request)

I have two large arrays (which are actually worksheets that have been loaded
into memory for faster processing); I cycle through every 'row' in the first
array to get a source value, then I cycle through every value in one
'column' of the second array to find /every/ match of that value.

Due to the size of my arrays, this takes a long time (about 10 minutes). It
seems that if I could use application.match, this could speed things up
considerably.

Can anyone suggest syntax for using application.match against a
multidimensional array, and even better, how to iterate from the last found
match to the end of the array each time?

I'm thinking something like:

Dim SourceArray (1 to 10,000, 1 to 50)
Dim CheckArray (1 to 40,000, 1 to 100)

'load the sheets, then:

For MySourceRow = 1 to 10000
SourceValue = SourceArray (MySourceRow, 14)
FoundMatchRow = Application.Match(SourceValue, CheckArray(?,31),False)
....etc

The two problems I need to overcome are (a) how do I refer to a single
dimension of a multidimensional array (where the questionmark is- match
against all of column 31), and (b) if I find a match, how do I make a
subsequent loop only search for matches from there forward, e.g. if a match
is found in row 27,418, then I want to do another application.match with the
same SourceValue for rows 27,419 through 40,000 for column 31 in my
CheckArray table.

Thanks for any help and advice!
Keith


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional IF formula using multi-dimensional arrays iperlovsky Excel Worksheet Functions 2 April 13th 10 05:15 PM
two dimensional arrays Dave Breitenbach Excel Worksheet Functions 4 September 19th 07 09:12 PM
bi-dimensional arrays ina Excel Programming 2 April 28th 06 12:18 PM
Multi-dimensional arrays gti_jobert[_5_] Excel Programming 6 February 6th 06 04:45 AM
Declaring 2 dimensional arrays Dan[_49_] Excel Programming 4 November 17th 05 08:36 PM


All times are GMT +1. The time now is 04:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"