+ Reply to Thread
Results 1 to 2 of 2

Rounded-off number

  1. #1
    Registered User
    Join Date
    09-16-2005
    Posts
    32

    Rounded-off number

    Hello all,
    does anyone know how in VB to make the rounded-off number.
    If I have in Cell A1 "1", I want "10"
    If I have in Cell A2 "8", I want "10"
    If I have in Cell A3 "12", I want "20"
    If I have in Cell A4 "119", I want "120"
    If I have in Cell A5 "1015", I want "1020"
    If I have in Cell A6 "110", I want "110"
    If I have in Cell A7 "111", I want "110"
    ....

    Thanks in advance

    Herve

  2. #2
    Carlos
    Guest

    Re: Rounded-off number

    Hi Herve

    try ceiling function with significance 10

    ex if cell a4

    sub Rounded()
    dim oCell as Range
    set oCell=Range("A4")
    Val_round= Application.WorksheetFunction.Ceiling(oCell, 10)
    end sub

    "herve" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hello all,
    > does anyone know how in VB to make the rounded-off number.
    > If I have in Cell A1 "1", I want "10"
    > If I have in Cell A2 "8", I want "10"
    > If I have in Cell A3 "12", I want "20"
    > If I have in Cell A4 "119", I want "120"
    > If I have in Cell A5 "1015", I want "1020"
    > If I have in Cell A6 "110", I want "110"
    > If I have in Cell A7 "111", I want "110"
    > ...
    >
    > Thanks in advance
    >
    > Herve
    >
    >
    > --
    > herve
    > ------------------------------------------------------------------------
    > herve's Profile:
    > http://www.excelforum.com/member.php...o&userid=27314
    > View this thread: http://www.excelforum.com/showthread...hreadid=481937
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1