Hello everyone
I have created the following code
The worksheet has columns from A to J with numbers .. and there are CODE numbers in M1 to V1Please Login or Register to view this content.
The idea of the code is that to loop the data in columns A to J and if a CODE number found twice in two adjacent rows then: >>
to store the two rows of spot and a row before and a row after
Example:
the CODE number 51 is in two rows 3 and 4 (these rows we can call it spot rows) , so we deal with the row before this spot which is row 2 and the row after this spot which is row 5
So we deal in this case with rows from 2 to 5 >> then store in a dictionary any number except the numbers within the CODE numbers
The code is working fine on the Sample attached as this is Sample but as for the original data which is about 3000 rows, it takes about a minute
Is there a way to improve it ..? or what is in the code that makes the code runs slowly?
Bookmarks