Help extracting a number...

Your question is well hidden inside this mass of code. I recommend that you edit the post to format it, it will likely increase your chance of receiving support.