Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Rounding up or down in the same formula

How do I create a single formula to either round up or down the result of my
formula to the nearest "9"?
i.e.
843 = 839
845 = 849
etc., etc.
Thanks,
Jack
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,345
Default Rounding up or down in the same formula

Are you number always integers? If so try:

=ROUND(A1,-1)-1

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Jack L. Hyman" <Jack L.
wrote in message
...
How do I create a single formula to either round up or down the result of
my
formula to the nearest "9"?
i.e.
843 = 839
845 = 849
etc., etc.
Thanks,
Jack



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Rounding up or down in the same formula

Try

=ROUND(A1/10,0)*10-1

problem will occur with a value smaller than 5 so you might want to use an
IF function for that or simply use

=MAX(ROUND(A1/10,0)*10-1,0)

which will return zero if a value is less than 5

--


Regards,


Peo Sjoblom


"Jack L. Hyman" <Jack L. wrote in message
...
How do I create a single formula to either round up or down the result of
my
formula to the nearest "9"?
i.e.
843 = 839
845 = 849
etc., etc.
Thanks,
Jack



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Rounding up or down in the same formula

Doh!



--


Regards,


Peo Sjoblom


"Sandy Mann" wrote in message
...
Are you number always integers? If so try:

=ROUND(A1,-1)-1

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Jack L. Hyman" <Jack L.
wrote in message
...
How do I create a single formula to either round up or down the result of
my
formula to the nearest "9"?
i.e.
843 = 839
845 = 849
etc., etc.
Thanks,
Jack





  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Rounding up or down in the same formula

Thank you!

"Peo Sjoblom" wrote:

Try

=ROUND(A1/10,0)*10-1

problem will occur with a value smaller than 5 so you might want to use an
IF function for that or simply use

=MAX(ROUND(A1/10,0)*10-1,0)

which will return zero if a value is less than 5

--


Regards,


Peo Sjoblom


"Jack L. Hyman" <Jack L. wrote in message
...
How do I create a single formula to either round up or down the result of
my
formula to the nearest "9"?
i.e.
843 = 839
845 = 849
etc., etc.
Thanks,
Jack






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Rounding up or down in the same formula

Thank you very much!

"Sandy Mann" wrote:

Are you number always integers? If so try:

=ROUND(A1,-1)-1

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Jack L. Hyman" <Jack L.
wrote in message
...
How do I create a single formula to either round up or down the result of
my
formula to the nearest "9"?
i.e.
843 = 839
845 = 849
etc., etc.
Thanks,
Jack




  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Rounding up or down in the same formula

You might want to use Sandy's formula that will do the same with less effort


--


Regards,


Peo Sjoblom



"Jack L. Hyman" wrote in message
...
Thank you!

"Peo Sjoblom" wrote:

Try

=ROUND(A1/10,0)*10-1

problem will occur with a value smaller than 5 so you might want to use
an
IF function for that or simply use

=MAX(ROUND(A1/10,0)*10-1,0)

which will return zero if a value is less than 5

--


Regards,


Peo Sjoblom


"Jack L. Hyman" <Jack L. wrote in
message
...
How do I create a single formula to either round up or down the result
of
my
formula to the nearest "9"?
i.e.
843 = 839
845 = 849
etc., etc.
Thanks,
Jack






  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Rounding up or down in the same formula

Thank you...both do the job well.

"Peo Sjoblom" wrote:

You might want to use Sandy's formula that will do the same with less effort


--


Regards,


Peo Sjoblom



"Jack L. Hyman" wrote in message
...
Thank you!

"Peo Sjoblom" wrote:

Try

=ROUND(A1/10,0)*10-1

problem will occur with a value smaller than 5 so you might want to use
an
IF function for that or simply use

=MAX(ROUND(A1/10,0)*10-1,0)

which will return zero if a value is less than 5

--


Regards,


Peo Sjoblom


"Jack L. Hyman" <Jack L. wrote in
message
...
How do I create a single formula to either round up or down the result
of
my
formula to the nearest "9"?
i.e.
843 = 839
845 = 849
etc., etc.
Thanks,
Jack






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
I need a formula with rounding up & rounding down to the nearest . Tony Kay Excel Worksheet Functions 3 May 29th 07 11:13 PM
Rounding Formula mccrimmon Excel Worksheet Functions 3 June 27th 06 12:49 PM
Rounding up Formula milsupport Excel Worksheet Functions 8 May 31st 06 10:32 AM
Rounding with the sum formula pgruening Excel Discussion (Misc queries) 3 January 2nd 06 08:20 PM
rounding formula Joel Allen Excel Worksheet Functions 3 September 20th 05 12:05 AM


All times are GMT +1. The time now is 01:19 PM.

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

About Us

"It's about Microsoft Excel"