Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
round up (ends with...) | Excel Worksheet Functions | |||
filter using "ends with" and 3 choices? Ex: ends with 1,2 or3 | Excel Worksheet Functions | |||
How to round of the value with ends zero(0) | Excel Programming | |||
+(-)ve values ends in Dr(Cr) | Excel Programming | |||
How do I ROUND() round off decimals of a column dataset? | Excel Worksheet Functions |