Dim knownX1 As Range '3 nm value range for first intersection ex.(470,480,490)
Dim knownY1 As Range '3 corresponding chromaticity values for the above wavelengths
Dim knownX2 As Range '3 nm value range for second intersection ex.(570,580,590)
Dim knownY2 As Range '3 corresponding chromaticity values for the above wavelengths
Set knownX1 = Sheets("references").Range("b" & wavelength1 - 1 & ":b" & wavelength1 + 1) 'uses the nm point values to define 3 nm range for 2nd degree polynomial range. example: 450,460,470 will be the range
Set knownY1 = Sheets("references").Range("bz" & wavelength1 - 1 & ":bz" & wavelength1 + 1) 'returns the corresponding chromaticity valuese for the illuminant of these 3 nm points.
Set knownX2 = Sheets("references").Range("b" & wavelength2 - 1 & ":b" & wavelength2 + 1) 'same but for intersection 2
Set knownY2 = Sheets("references").Range("bz" & wavelength2 - 1 & ":bz" & wavelength2 + 1) 'ditto
i have a situation where I am troubleshooting a user function that returns #value! errors when this block of code is in, however when i comment it out, it will return a basic value like
function output(x as integer)
block above
output = x
end function
obviously there is other stuff in there. am i referring to this range incorrectly? this block of code works perfectly when the user inputs of my function create a specific type of result but not others. when i tried to step into this function via a sub, i would get overflow errors on the first calculation (that was simple division).
any ideas?
Bookmarks