nevertoolate
Technical User
I have a spreadsheet containing thousands of lines of data that I search to extract data for reports. A current sheet has 43,000 lines, and the vba program crashes after searching 32767 rows. The search is done in a "Do-Loop While" loop, and 32767 is the maximum number of iterations possible in excel. So I guess that 32767 is also the maximum number of loops allowed in excel. The error message is an "overflow" error.
I have tried adding another loop which is initiated if and when 32767 records have been searched in the first loop, but vba seems to remember this and the same overflow error is returned when the new loop is first initiated.
I find this especially irritating since I can refer to cell(32768,1) in the program and get its value, but I cannot refer to cell(32767+NewCounter,1), where NewCounter =1, without getting an overflow error.
Any ideas?
I have tried adding another loop which is initiated if and when 32767 records have been searched in the first loop, but vba seems to remember this and the same overflow error is returned when the new loop is first initiated.
I find this especially irritating since I can refer to cell(32768,1) in the program and get its value, but I cannot refer to cell(32767+NewCounter,1), where NewCounter =1, without getting an overflow error.
Any ideas?