+ Reply to Thread
Results 1 to 7 of 7

Rounding to the nearest 5

Hybrid View

  1. #1
    Registered User
    Join Date
    08-25-2009
    Location
    Leeds, England
    MS-Off Ver
    Excel 2003
    Posts
    72

    Rounding to the nearest 5

    Hi,

    I have a long list of prices which I need to round to the nearest £5. What's the best way of doing this?

    Many thanks

    RL

    Sample attached
    Attached Files Attached Files
    Last edited by Redder Lurtz; 01-27-2011 at 06:46 AM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,627

    Re: Rounding to the nearest 5

    1,96 should round to 0 or 5 and 6,84 round to 5 or 10?

  3. #3
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Rounding to the nearest 5

    =ROUND(A2/5,0)*5

    or to round up:

    =ROUNDUP(A2/5,0)*5

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  4. #4
    Registered User
    Join Date
    08-25-2009
    Location
    Leeds, England
    MS-Off Ver
    Excel 2003
    Posts
    72

    Re: Rounding to the nearest 5

    Quote Originally Posted by Domski View Post
    =ROUND(A2/5,0)*5

    or to round up:

    =ROUNDUP(A2/5,0)*5

    Dom
    Thanks Dom.

    Is there also a way of expressing the figures as betewwn 0 and 5, 5 and 10, 10 and 15 etc?

    Cheers

    RL

  5. #5
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Rounding to the nearest 5

    Quote Originally Posted by Redder Lurtz View Post
    Is there also a way of expressing the figures as betewwn 0 and 5, 5 and 10, 10 and 15 etc?
    Maybe:

    =IF(FLOOR(A2,5)=A2,FLOOR(A2,5)-5,FLOOR(A2,5))&" to "&CEILING(A2,5)

    Dom
    Last edited by Domski; 01-27-2011 at 06:29 AM.

  6. #6
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Rounding to the nearest 5

    If you need to always round up to the nearest 5 maybe
    =ceiling(a2,5)
    will do

  7. #7
    Registered User
    Join Date
    08-25-2009
    Location
    Leeds, England
    MS-Off Ver
    Excel 2003
    Posts
    72

    Re: Rounding to the nearest 5

    Thanks Dom & others. Very useful as always.

    RL

+ 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