I thought I had figured this out since I was getting results in my worksheet, then all the numbers were replaced by errors (#NAME, #VALUE). There are several calculation functions in this workbook, all in .xla add-ins so I am unable to upload it here. But I believe the source of my issues come from this function. It is essentially an iterative process producing "guesses" until certain criteria is met. I believe is it also producing a circular reference. At one point this file did work and produced good results, it would take a couple of hours as the calculation was performed on 8000+ rows for 3 different goal scenarios.
Could this code be simplified (require less iterations) or written in such a way to eliminate the circular reference? If someone is willing to look into it, I can provide a Dropbox link that would include the .xls and .xla files.
As the comments in the code suggest, the objective is to mix two air streams to meet certain temperature and humidity goals provided some known values (temperatures). The result will be the volume required from one of the air streams. That's about as much explanation of the calculation as I can provide. I'm still pretty entry level to HVAC calcs . I've identified the function variables, in case it's helpful.
Z = altitude (known value)
db1 = outside air dry bulb temp (known value)
wb1 = outside air we tbulb temp (known value)
db2 = return air dry bulb temp (known value)
wb2 = return air wet bulb temp (known value)
Tcfm = total CFM of air available (known value. This function will determine the volume required from the outside air stream. The difference will be the volume of the return air stream)
TMdb = supply dry bulb temp (known value)
TMwb = supply wet bulb temp (known value)
DBorWB = this is determined by a function that results in either "DB" or "WB" (used in the IF statements below)