+ Reply to Thread
Results 1 to 15 of 15

Possible to round up values to set amounts?

  1. #1
    Registered User
    Join Date
    04-28-2013
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    26

    Possible to round up values to set amounts?

    I was wondering if it's possible to round up a column of numbers to the nearest .05, or .09?

    They will all be prices. So for example some of them could be

    4.33
    3.26
    2.94
    2.96

    I would want these rounded up to:

    4.35
    3.29
    2.95
    2.99

    Thanks!

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Possible to round up values to set amounts?

    Hi Fred45,

    Try the following in a cell:
    Please Login or Register  to view this content.
    The formulae multiply by 100,
    then roundup to 1 digit (e.g. 324 becomes 330)
    then divides by 100 (multiply by 0.01)
    then adds the last digit.

    Lewis

  3. #3
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Possible to round up values to set amounts?

    This seems to work with limited testing. You didn't supply a minimum value to which this would apply so I omitted one:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Possible to round up values to set amounts?

    a
    b
    c
    1
    0.19
    0.19
    b1: =floor(a1+0.001, 0.1) + lookup(mod(a1+0.001, 0.1), {0,5}%, {5,9}%)
    2
    7.14
    7.15
    3
    2.75
    2.79
    4
    7.95
    7.99
    5
    2.67
    2.69
    6
    2.90
    2.95
    7
    9.46
    9.49
    8
    7.04
    7.05
    9
    2.26
    2.29
    10
    9.65
    9.69
    11
    4.32
    4.35
    12
    7.76
    7.79
    13
    4.27
    4.29
    14
    7.09
    7.09
    15
    9.91
    9.95
    16
    1.39
    1.39
    17
    2.85
    2.89
    18
    4.97
    4.99
    19
    2.41
    2.45
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Possible to round up values to set amounts?

    Or:

    =IF(OR(--RIGHT(A1)={5,9}),A1,--SUBSTITUTE(A1,RIGHT(A1),IF(--RIGHT(A1)<5,5,9)))

    A
    B
    1
    4.33
    4.55
    2
    3.26
    3.29
    3
    2.94
    2.95
    4
    2.96
    2.99
    5
    4.35
    4.35
    6
    3.29
    3.29
    7
    2.95
    2.95
    8
    2.99
    2.99
    9
    2.99
    2.99
    10
    2.98
    2.99
    11
    2.97
    2.99
    12
    3.55
    3.55
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  6. #6
    Registered User
    Join Date
    04-28-2013
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: Possible to round up values to set amounts?

    Thanks guys. Glad I asked as I would never have figured this one out!

    shg's seems to be perfect for what I was after with only one slight flaw. If the number is already at .x5, it will round up to .x9

    So on that table, 2.85 rounds to 2.89 and 9.65 rounds to 9.69, but I'd rather they stayed put as they are already at .x5. Is there any sort of amendment that might solve that?

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Possible to round up values to set amounts?

    =floor(a1+1%%, 0.1) + lookup(mod(a1+1%%, 0.1), {0,6}%, {5,9}%)

  8. #8
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Possible to round up values to set amounts?

    I think my formula already does it.

  9. #9
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Possible to round up values to set amounts?

    I think your formula has a problem with whole numbers, Al.

  10. #10
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Possible to round up values to set amounts?

    This should do what you want:

    A
    B
    C
    1
    $4.33
    $4.35
    =IF(RIGHT(A1,1)*1<=5,CEILING(A1,0.05),IF(RIGHT(A1,1)*1>5,CEILING(A1,0.0997)))
    2
    $3.26
    $3.29
    3
    $2.94
    $2.95
    4
    $2.96
    $2.99
    5
    $2.90
    $2.99
    6
    $2.91
    $2.95
    7
    $2.92
    $2.95
    8
    $2.93
    $2.95
    9
    $2.94
    $2.95
    10
    $2.95
    $2.95
    11
    $2.96
    $2.99
    12
    $2.97
    $2.99
    13
    $2.98
    $2.99
    14
    $2.99
    $2.99
    15
    $3.00
    $3.00

  11. #11
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Possible to round up values to set amounts?

    $2.90 -> $2.99 ? If so, I misunderstood.

  12. #12
    Registered User
    Join Date
    04-28-2013
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: Possible to round up values to set amounts?

    Alkey's formula did do it, but yes it seemed to round up whole numbers to more whole numbers if they were already whole... if that makes sense.

    shg's last one seems to do the trick!

  13. #13
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Possible to round up values to set amounts?

    Hmm I din't see any whole numbers but here is the adjusted formula

    =IF(MOD(A1,1)=0,A1,IF(OR(--RIGHT(A1)={5,9}),A1,--SUBSTITUTE(A1,RIGHT(A1),IF(--RIGHT(A1)<5,5,9))))

  14. #14
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Possible to round up values to set amounts?

    a
    b
    c
    1
    100.10
    500.50
    b1: =if(mod(a1,1)=0,a1,if(or(--right(a1)={5,9}),a1,--substitute(a1,right(a1),if(--right(a1)<5,5,9))))

  15. #15
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Possible to round up values to set amounts?

    how about
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] ROUND CENTS TO EITHER 49 OR 99 AMOUNTS
    By PRICEMGR in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-30-2021, 09:56 AM
  2. Replies: 2
    Last Post: 02-23-2014, 09:56 PM
  3. COUNT Values (Amounts and Yes/No)
    By Hazarrd in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-14-2013, 05:44 PM
  4. [SOLVED] Add Invoice Amounts and Paid Amounts based on user inputs.
    By s2jrchoi in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-18-2013, 01:49 PM
  5. HOW DO I ADD AMOUNTS FOR DIFERENT VALUES
    By Paulo Coelho in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-15-2006, 08:50 PM

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