Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 90
Default More function than FLOOR() !

I have a problem for an excel formula. I want to convert 1 to 0, 2 to 0,......
..., 10 to 0. And convert 11 to 10, 12 to 10,............, 20 to 10.

I know the formula of FLOOR can have this function, however, it will convert
10 to 10, 20 to 20 which is not I want. What I want is to convert 10 to 0, 20
to 10, 30 to 20, 40 to 30. Therefore, how can I achieve this result by using
Excel Formular?

Many thanks,
Wilchong

--
Message posted via http://www.officekb.com

  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2,420
Default More function than FLOOR() !

If you won't have very small increments

=FLOOR(A21-1/10^10,10)

--
__________________________________
HTH

Bob

"wilchong via OfficeKB.com" <u43231@uwe wrote in message
news:88277aa4e627b@uwe...
I have a problem for an excel formula. I want to convert 1 to 0, 2 to
0,......
.., 10 to 0. And convert 11 to 10, 12 to 10,............, 20 to 10.

I know the formula of FLOOR can have this function, however, it will
convert
10 to 10, 20 to 20 which is not I want. What I want is to convert 10 to 0,
20
to 10, 30 to 20, 40 to 30. Therefore, how can I achieve this result by
using
Excel Formular?

Many thanks,
Wilchong

--
Message posted via http://www.officekb.com



  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 52
Default More function than FLOOR() !

Hi wilchong
Try
=FLOOR(A21,10)-(A21=FLOOR(A21,10))*10

Regards,
Pedro J.



I have a problem for an excel formula. I want to convert 1 to 0, 2 to 0,......
.., 10 to 0. And convert 11 to 10, 12 to 10,............, 20 to 10.

I know the formula of FLOOR can have this function, however, it will convert
10 to 10, 20 to 20 which is not I want. What I want is to convert 10 to 0, 20
to 10, 30 to 20, 40 to 30. Therefore, how can I achieve this result by using
Excel Formular?

Many thanks,
Wilchong

  #4   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2,059
Default More function than FLOOR() !

On Aug 3, 11:43 pm, "wilchong via OfficeKB.com" <u43231@uwe wrote:
I have a problem for an excel formula. I want to convert 1 to 0,
2 to 0,........, 10 to 0. And convert 11 to 10, 12 to 10,............,
20 to 10.


FLOOR(A1 - 1, 10) seems to do what you want, as long as A1 is at least
1.


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

On Aug 3, 11:43*pm, "wilchong via OfficeKB.com" <u43231@uwe wrote:
I have a problem for an excel formula. I want to convert 1 to 0, 2 to 0,.......
.., 10 to 0. *And convert 11 to 10, 12 to 10,............, 20 to 10. *

I know the formula of FLOOR can have this function, however, it will convert
10 to 10, 20 to 20 which is not I want. What I want is to convert 10 to 0, 20
to 10, 30 to 20, 40 to 30. *Therefore, how can I achieve this result by using
Excel Formular?

Many thanks,
Wilchong

--
Message posted viahttp://www.officekb.com


  #5   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 5,651
Default More function than FLOOR() !

On Mon, 4 Aug 2008 13:29:42 -0700 (PDT), joeu2004 wrote:

FLOOR(A1 - 1, 10) seems to do what you want, as long as A1 is at least
1.


A1 would also have to be an integer, wouldn't it?
--ron


  #6   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2,059
Default More function than FLOOR() !

On Aug 4, 3:49*pm, Ron Rosenfeld wrote:
On Mon, 4 Aug 2008 13:29:42 -0700 (PDT), joeu2004 wrote:
FLOOR(A1 - 1, 10) seems to do what you want,
as long as A1 is at least 1.


A1 would also have to be an integer, wouldn't it?


No. You could just try it yourself.

All of the OP's examples were integer. So it is unclear what the OP
wants to do, for example, with 10.99 and if that is even a relevant
question in the context. If it is, I ass-u-me that the OP knows that
FLOOR "rounds down" (truncates), according to the help text.
  #7   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 5,651
Default More function than FLOOR() !

On Mon, 4 Aug 2008 18:15:11 -0700 (PDT), joeu2004 wrote:

No. You could just try it yourself.


I did.


All of the OP's examples were integer. So it is unclear what the OP
wants to do, for example, with 10.99 and if that is even a relevant
question in the context. If it is, I ass-u-me that the OP knows that
FLOOR "rounds down" (truncates), according to the help text.



Your method converts anything less than 11 to 0; anything less than 21 to 10

I guess I would have "ass"-umed, from the way the question was posed, than
values over 10 should convert to 10.

But I would agree that his description was ambiguous for handling values 10
and <11.
--ron
  #8   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2,059
Default More function than FLOOR() !

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. ;-)

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)

To do the only other contorted interpretation that I can imagine, as
well as what the OP asked for:

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

And while we're solving problems that the OP never asked about, any
one of those solutions can be further contorted to handle negative as
well as positive numbers. For example,

=sign(A1)*floor(abs(A1)-1,10)
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Will FLOOR & CEILING work with variable stratifications? johnu Excel Worksheet Functions 1 March 26th 08 06:53 AM
floor function srroduin Excel Worksheet Functions 2 May 12th 06 10:11 PM
is there a way of drawing floor plans within office madge New Users to Excel 7 April 6th 06 08:02 PM
Something like CEILING or FLOOR gusvenables Excel Worksheet Functions 3 October 28th 05 04:09 AM
ceiling & floor Bill Ridgeway New Users to Excel 1 August 7th 05 02:32 PM


All times are GMT +1. The time now is 03:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"