Delete Rows from an Array

Gives

Board Regular
Joined
Aug 22, 2006
Messages
160
I am trying to pull data from a source array into a target array by searching based on two criteria. The source array is 9x35,000 and the target array is 250x200. Each "row" in the source array only contains one entry for the target array and could be deleted or eliminated from the loop if I knew an efficient way to delete rows in the source array once the data has been pulled from them. See code below:

For i = 1 To coUnt 'coUnt=150
For j = 1 To naMes 'naMes=250
For ii = 1 To lastRow 'lastRow=35,000
If targetArray(j + 1, dataCol1) & targetArray(1, dataCol2+i) = sourceArray(ii, dataCol3) & sourceArray(ii, dataCol4) Then
targetArray(j + 1, dataCol2 + i) = sourceArray(ii, dataCol5)
GoTo cont2:
End If
Next ii
cont2:
Next j
Next i


I need to shorten the execution time by a factor of 10. Any applicable suggestions appreciated. Thanks!
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

Forum statistics

Threads
1,215,066
Messages
6,122,948
Members
449,095
Latest member
nmaske

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top