View Single Post
  #11   Report Post  
Old December 29th 12, 11:40 PM posted to uk.sci.weather
Alan LeHun Alan LeHun is offline
external usenet poster
 
First recorded activity by Weather-Banter: Jul 2003
Posts: 735
Default The Weather "Means" rule and spreadsheets

In article ,
says...
10.12 10.1
10.19 10.1
10.22 10.3
10.26 10.3
10.15 10.1
10.25 10.3


That's not quite right. 10.12 - 10.1 is ok, but 10.19 - 10.2, 10.22
- 10.2. The last 3 are ok too. The "different" behaviour occurs at
the mid-point between 10ths i.e. 10.05, 10.15, 10.25, etc. This is
where "throwing to the odd occurs (if you are measuring to the
nearest 10th). 10.05 - 10.1, 10.15 - 10.1, 10.25 - 10.3, 10.35 -
10.3 and so on. In Java you can do this type of rounding - but I
can't remember either what the "name" of this rounding is, nor which
package the rounding functions are in. I will look them both up in
the morning.


Ok. I see where your going. Excel does not appear to have such a
function, and if that is so, you would have to complicate things with an
IF function. Hey ho.

=IF(MOD(Cell*10,1)=0.5,(ODD(Cell*10-1))/10,ROUND(Cell,1))


10.12 10.1
10.19 10.2
10.22 10.2
10.26 10.3
10.15 10.1
10.25 10.3

--
Alan LeHun
Reply-to is valid. Add "BPSF" to subject: to bypass spam filters.