View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.newusers
joeu2004 joeu2004 is offline
external usenet poster
 
Posts: 2,059
Default More function than FLOOR() !

On Aug 5, 11:36*am, Ron Rosenfeld wrote:
Left unsaid is what should happen to a non-integer such as 10.9
Since 10.9 is greater than 10, I would have thought it should be
rounded down to 10.

Your formula would round it down to 0.


And my point was: left unsaid, there is no reason to think I was
wrong.

I interpreted the OP's intention to be: everything below 11 should
round down to 0, everything below 21 should round down to 10, etc.
Since it was left unsaid, I see no reason to think your interpretation
is any more or less reasonable than mine.


I'm understanding less and less of what you are posting.


Sorry about that. Once you start inventing conditions that are "left
unsaid", there are no limits to what your imagination might conjure
up. I wanted to cover all bases, just for KICKS ("keep it
complicated ...", the opposite of KISS ;-).

That does have the disadvantage of obsuring the KISS solution, which
what I tried to present in the first place.


----- original posting -----

On Mon, 4 Aug 2008 23:05:45 -0700 (PDT), joeu2004 wrote:
On Aug 4, 7:17*pm, Ron Rosenfeld wrote:
I guess I would have "ass"-umed, from the way the
question was posed, than values over 10 should convert
to 10.


Hmm, so you think that the OP chose FLOOR, a function that rounds
down, because the OP intended to round up. ;-)


I'm understanding less and less of what you are posting.

Rounding 11 to 10 is what I would call rounding down, not up.

The OP wrote (in part)

10 to 0
11 to 10

Left unsaid is what should happen to a non-integer such as 10.9

Since 10.9 is greater than 10, I would have thought it should be rounded down
to 10.

Your formula would round it down to 0.



Oh well, it's really not difficult to offer a constructive
improvement.


To do exactly what the OP asked for:


=floor(A1-1, 10)


To do what Ron wants, I think, as well as what the OP asked for:


=floor(roundup(A1,0)-1, 10)


This is more in accord with *my* interpretation of what the OP requested.
Thanks.
--ron