ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to round of the value with ends zero(0) (https://www.excelbanter.com/excel-programming/385246-how-round-value-ends-zero-0-a.html)

P Vasanth Kumar

How to round of the value with ends zero(0)
 
Hi.....

Pls help me. In cell values ends with 0 for ex:

now c1 cell value is 47 that value want to change 50......

Pls reply me.....

Thx n rgrds........

Vasanth


vinci

How to round of the value with ends zero(0)
 
hello vasanth,
use this ceiling function
syntax
=====

=ceiling(data_cell,roundup value)
example
=======
your c1 value is 47
c2 value is 44 we want to
round next 5 round one. ex. 7 is next 5 10, 13 is next 5 15 like
this.

formula
=======
next5
=====
=ceiling(c1,5) answer = 50
=ceiling(c2,5) answer = 45.

next 10
======

=ceiling(c1,5) answer = 50
=ceiling(c2,5) answer = 50


if any doubt u may contact my personal mail id

regards,
vinci



On Mar 14, 6:06 pm, P Vasanth Kumar
wrote:
Hi.....

Pls help me. In cell values ends with 0 for ex:

now c1 cell value is 47 that value want to change 50......

Pls reply me.....

Thx n rgrds........

Vasanth




Incidental

How to round of the value with ends zero(0)
 
Hi there

Not sure exactly what you are wanting to do but this code will round
up the activecel to the nearest 10 as long as it the last digit in the
number is greater than 0.

Option Explicit
Dim Mystr, StrVal As String
Dim i As Integer

Private Sub CommandButton1_Click()
StrVal = Right(ActiveCell, 1)
i = StrVal
If i = 0 Then
Exit Sub
Else
i = 10 - i
ActiveCell.Value = ActiveCell + i
End If

hope this helps you

S



All times are GMT +1. The time now is 05:32 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com