auto round to multiple of 10

ajitsingh

New Member
Joined
Mar 7, 2010
Messages
33
i am trying to round a number to next multiple of 10 with condition i.e.
for example if number is 1230.56 then it should round off to 1230
but if the unit number is more than zero i.e. 1231.56 then it should round off to 1240.
that means the main number should round off to next multiple of 10 only if unit number is equal to or more than 1.

example 120.11 should round off to 120
121 to 130
120.99 to 120
119 to 120 and so on
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Hi,

Maybe this

=IF(MOD(TRUNC(A1),10)<>0,TRUNC(A1)+10-MOD(TRUNC(A1),10),TRUNC(A1))

HTH

M.
 
Upvote 0
Also
=IF(ISERROR(SEARCH(".";A1));ROUNDUP(A1;-1);IF(--MID(A1;SEARCH(".";A1)-1;1)=0;ROUND(A1;-1);ROUNDUP(A1;-1)))
 
Upvote 0
Hi jason, the formula doesn't in the following way
i.e.
i) if the value is say 10.9 (it should round to 10) not 20 (which your formula does)
ii) yeah if the value is 11 or more it rounds to 20.

but however Branco's formula works as required...

Thanx anyway
 
Upvote 0
if the value is say 10.9 (it should round to 10) not 20 (which your formula does)

It works correctly for me, and for everyone else, sounds like your workbook is broken.
*AB

<COLGROUP><COL style="WIDTH: 30px; FONT-WEIGHT: bold"><COL style="WIDTH: 64px"><COL style="WIDTH: 64px"></COLGROUP><TBODY>
[TD="bgcolor: #cacaca, align: center"]1[/TD]
[TD="align: right"]10.9[/TD]
[TD="align: right"]10[/TD]

</TBODY>

Spreadsheet Formulas
CellFormula
B1=CEILING(INT(A1),10)

<TBODY>
</TBODY>

<TBODY>
</TBODY>
 
Upvote 0

Forum statistics

Threads
1,224,606
Messages
6,179,866
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top