I can't really comment. I haven't got any data ... your data ... to test it with. Assuming they are numeric values, it should be OK.

The two range sizes need to be the same. If the ranges are different sizes, you'll get #N/A

Regards, TMS