Function code and screen shot of data shown below.
A Ratio (double) is passed into the function from the main body of the code. This Ratio is also the Advanced Ratio seen in the screen shot. The purpose of the function is to find a matching Advanced Ratio, and return its corresponding Cp. The reason I have the switch is because the data I have is only for intervals of 0.07, and this is how I thought to find the closest value to the inputted ratio (might be a much cleaner way).
I am getting a compiler error saying sub or function not defined. I am really rusty with coding. I placed this function right after the main Sub of the code. Not even sure if this function will return the Cp value? Any help is much appreciated.
Please Login or Register to view this content.
http://i54.tinypic.com/4v2rdd.png
Bookmarks