I sent you the Workbook back to the email address you provided me in the PM.
The issue is due to dividing by zero which I corrected by doing the following:
Also, I formatted your code, and declared everything. One other thing, the code looks like it was generated using the Macro recorder which is fine, but just understand that the code that is generated is generally not very efficient. For example, each cell is selected in the following line
. Rather than do this, you can refer to the cell using the Range object. You can also read the sheet rather than hard code the array indices.
But, in the end, if the solution does what you want it to do, and it works, then use it
Bookmarks