Hi All
I have two arrays (TIimeTS and Data) and i am looping through them but i think i am doing unnecessary loops and i hope someone can point me in how to reduce the loops or use a different type of loop as its taking a long time to run through as i am looping a total of ~264 million times over my If code! and i am sure i dont need that iterations.
TimeTS has a list of dates and times sorted for a month so a records for each minute so 1440*31 = 44,640 records, sorted in order
Data also has date and times but not for the whole month ~6000 minutes, a minute is not duplicated and Data is sorted in order
I have
For i = 2 to Ubound(TimeTS)
For j = 2 to Uboound(Data)
If TimeTS(i, 2) = Data(j, 4) then
'match found so do something here
End If
Next J
Next i
i want to find when the date and minute in matches the date in minute in Data and then use the If statement.
can anyone suggest and alterative approach ?
what i want is for the j loop to only
I have two arrays (TIimeTS and Data) and i am looping through them but i think i am doing unnecessary loops and i hope someone can point me in how to reduce the loops or use a different type of loop as its taking a long time to run through as i am looping a total of ~264 million times over my If code! and i am sure i dont need that iterations.
TimeTS has a list of dates and times sorted for a month so a records for each minute so 1440*31 = 44,640 records, sorted in order
Data also has date and times but not for the whole month ~6000 minutes, a minute is not duplicated and Data is sorted in order
I have
For i = 2 to Ubound(TimeTS)
For j = 2 to Uboound(Data)
If TimeTS(i, 2) = Data(j, 4) then
'match found so do something here
End If
Next J
Next i
i want to find when the date and minute in matches the date in minute in Data and then use the If statement.
can anyone suggest and alterative approach ?
what i want is for the j loop to only