Hello,
I've written a macro that compares two excel files (fileA and fileB) row by row to look for rows that are duplicates (that are in both file). Each row in each file has a patient ID (ie. A4522335) and a visit number (ie. 3). If two rows in both files have the same patient ID and visit number, then I mark it as a duplicate. One of the files is around 7500 rows in length and the other is about 2500 rows in length.
I run the macro from fileA. It allows the user to choose the file to compare fileA to. When I choose fileB the macro starts chugging through the rows, and eventually stops responding. Sometimes it takes 10 minutes to stop, sometimes its right after I choose fileB to open. If I watch the windows task manager under the "Applications" tab another occurance of fileA appears right before excel stops responding.
I really don't know how to debug this. Usually the excel vba debugger is pretty good at telling me where the problem is, but not this time. I've tried putting a break point in the loop/compare code and stepping through, but stepping through 18.7 million loops (7500x2500) gets old quickly, or even stepping through just 7500 loops (if I break at each next row in fileA) is too much. Does anyone have any suggestions for debugging this problem?
thanks,
jay9333
I've written a macro that compares two excel files (fileA and fileB) row by row to look for rows that are duplicates (that are in both file). Each row in each file has a patient ID (ie. A4522335) and a visit number (ie. 3). If two rows in both files have the same patient ID and visit number, then I mark it as a duplicate. One of the files is around 7500 rows in length and the other is about 2500 rows in length.
I run the macro from fileA. It allows the user to choose the file to compare fileA to. When I choose fileB the macro starts chugging through the rows, and eventually stops responding. Sometimes it takes 10 minutes to stop, sometimes its right after I choose fileB to open. If I watch the windows task manager under the "Applications" tab another occurance of fileA appears right before excel stops responding.
I really don't know how to debug this. Usually the excel vba debugger is pretty good at telling me where the problem is, but not this time. I've tried putting a break point in the loop/compare code and stepping through, but stepping through 18.7 million loops (7500x2500) gets old quickly, or even stepping through just 7500 loops (if I break at each next row in fileA) is too much. Does anyone have any suggestions for debugging this problem?
thanks,
jay9333