Quote Originally Posted by p45cal
The code is not crashing at all. It is coming to and End statement, because t20ra was empty so nothing was found in the range searched.
End is a bit draconian:"Terminates execution immediately. Never required by itself but may be placed anywhere in a procedure to end code execution, close files opened with the Open statement and to clear variables."

What do you want to happen when something like this is encountered.

well If there is no value in t20 ra it means it is not being compaired and can just move onto the next statement

how come it does not end the program when it is checkcking the first page calculations ..


I would like it to do exactly what it does on the first page but on the sheet summary , is it just where I have place the end statement