What am I missing
I have a code that is looking through the matrix and selects creepage based on my input parameters (PD, MG and working voltage WV). It works great....in picture 1.
picture 1
Now, I want to add a linear interpolation between 2 values of the voltage. I made a variable "a" doing linear interpolation and tested it works as expected, which it do. Column variable for searching in matrix is hardcoded at the beginning for test.

Now, since it work, code A (linear interpolation of the creepage) replace code B (that is using only search method w/o interpolation) in the original code.

That is the only change in original code. Code A is tested it works, gives values I need but after A replaces B function that is calling creepage(WV,PD,MG) is complaining "These units are not compatible". What am I missing? I dont see any problem there.
thanks
Running on Mathcad Prime 11.0.1.0

