Your code is strange to me. Maybe if you posted your workbook someone might look at it. And, you should simplify the code so that it is readily understood by humans. I suggest that you get a VBA book by John Walkenbach and follow good practice. And don't skip the first few chapters. And, since you are looking for something to do, learn to program with C#. You will find that this skill will greatly enhance your capability as a chemical engineer. While learning C#, you will also learn how to think logically. And, if you have an instutition of higher learning near, you should take a computer science course. This will help you much more than anything else you might do.
ps
Another thought came to me during my nap. Obviously, Excel has an opinion different from yours about the numbers presented to it. Lucky for you, resolution is easy. All you need to do is see what Excel is seeing, perhaps. Then you can adapt your code.This is all part of debugging, an essential ingredient in programming. I think you gave up too soon. But that's the youthful quest for instant gratification.
pps
And, tomorrow I will post a workbook that resolves your dilema as you have engaged my curiosity. "If at first you don't succeed, try, try again." And I have attempted to make the code simple and easy to understand and maybe useful, at least helpful, for other endevors with some editing. Between the spreadsheet and the code, you will see some relatively good effort to achieve simplicity and comprehension. Hopefully, it will also raise a curiosity that you might pursue learning more.
Bobby
Edited by Bobby Strain, 03 October 2015 - 10:50 PM.