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: 9
Default Search in multi dimensional array - URGENT help

Hi all,

I have a array defined

Public Type fld_cis_mng
mng_no_o As String ' J - 10
mng_no_n As String ' K - 11
mng_id As String ' L - 12
mng_fname As String ' M - 13
mng_sname As String ' N - 14
mng_email As String ' O - 15
End Type
Public cis_mng() As fld_cis_mng

then I am loading data into this array going thru the cells and write the
values

Workbooks(fl_util).Sheets(sht_name).Activate
'Select last used cell in row
rowfree = Cells(Rows.count, 10).End(xlUp).Row
t_cis_m = 0
j = 0
ReDim cis_mng(rowfree)
For i = 2 To rowfree ' go row by row
j = j + 1
cis_mng(j).mng_no_o = Worksheets(sht_name).Cells(i, 10).text
cis_mng(j).mng_no_n = Worksheets(sht_name).Cells(i, 11).text
cis_mng(j).mng_id = Worksheets(sht_name).Cells(i, 12).text
cis_mng(j).mng_fname = Worksheets(sht_name).Cells(i, 13).text
cis_mng(j).mng_sname = Worksheets(sht_name).Cells(i, 14).text
cis_mng(j).mng_email = Worksheets(sht_name).Cells(i, 15).text
Next i
ReDim Preserve cis_mng(j)

So then I have different array like this and I would like to go thru the one
array and search via unique id the record with the correct value. I have over
6500 rown in each array and it takes long time to go thru the both array.

At the moment I am using

for i = 1 to A_max
for j = 1 to B_max
if value(i).id = value(j).id then
value(i).no = value(j).no
exit for
end if
next j
next i

It is something to not go record by record but use some find/search function?

Thanks a lot

Stan
 
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
Multi Dimensional Array steve Excel Programming 4 September 26th 06 07:33 PM
Multi Dimensional Array andym Excel Programming 11 July 10th 06 05:09 AM
Multi-Dimensional Array Let & Get Trip[_3_] Excel Programming 0 September 21st 05 08:41 PM
Viewing Multi dimensional array Codea Excel Programming 1 August 5th 04 01:30 PM
Problem with Multi-Dimensional Array Kirk[_2_] Excel Programming 2 August 26th 03 03:31 PM


All times are GMT +1. The time now is 08:03 AM.

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"