I can't figure out the terminology to search for the function I want:
Anrduino has a map(value,inLo,inHi,outLo,outHi) function that takes a value within IN range and returns the value with the same ratio mapped to the OUT range. For example map(5,0,6,200,380) returns 350 because the value 5 in a range of 0-6 is 5/6 and 5/6 of the range from 200 to 380 is 350.
I can write my own function in Excel but I am guessing there is something built in.
Very good explanation is given by James Ramsden here: http://james-ramsden.com/map-a-value-from-one-number-scale-to-another-formula-and-c-code/
Essentially if one scale is from a0 to a1 and other scale is from b0 to b1 and you want to map the value a to some value of b. The equation is:

Put in the same terms as the original question:
map(value, inLo, inHi, outLo, outHi) = outLo + (outHi - outLo) * (value - inLo) / (inHi - inLo)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With