Quote Originally Posted by StevenM View Post
Here are some suggestions.
Use doubles rather than singles.
Do While (Sheet11.Range("$Z$37") <> iSparge)
When you compare two floating point numbers, it is best to Round each of them to x number of places. Perhaps something like:

Do While (Round(Sheet11.Range("$Z$37"), 2) <> Round(iSparge, 2))
The maximum number of significant digits in a double is around 15.
Thanks for the tips. I got the first loop to work by inserting a round function into the cells instead of the code. I tried the same thing with this one and it doesn't seem to work. I have no idea what I'm doing in VBA. I got the code from someone else and have been playing with it trying to get it to work.

I entered the code you gave me. It brought back an error. Compile Error: Sub or function not defined. And it highlighed "Round" in blue. I am using a pretty old version of excel from office 97 if that makes a difference.