Can anyone give me some ideas on how to find the middle value between 3 numbers.?
Assuming it is always 3 numbers, and what you want is the median value, here is a simple way. Find the maximum then the minimum and the one you didn't pick is the median. :)