+ Reply to Thread
Results 1 to 18 of 18

Conditional Round up or Round up Function

  1. #1
    Registered User
    Join Date
    09-18-2013
    Location
    Harare
    MS-Off Ver
    Excel 2007-2010
    Posts
    16

    Conditional Round up or Round up Function

    Hi

    I urgently need a formula to round up some data as follows.

    If data is entered in a cell is 1.1 or less then add one to make my desired result 2
    If data is entered in a cell or 1.4 or greater add two to make my desired result 3

    Please note I want to be able to round up using decimal places i.e If decimal place is 0.1 then add one
    and if the decimal place is 0.4 then add two.

    Thanks in advance
    Last edited by cdmterence; 09-18-2013 at 01:45 PM.

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Conditional Round up or Round up Function

    Please Login or Register  to view this content.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    09-18-2013
    Location
    Harare
    MS-Off Ver
    Excel 2007-2010
    Posts
    16

    Re: Conditional Round up or Round up Function

    Thanks for the code but its not working
    Last edited by cdmterence; 09-18-2013 at 01:51 PM.

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Conditional Round up or Round up Function

    There was a typo in the formula (semi-collon instead of comma).

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    09-18-2013
    Location
    Harare
    MS-Off Ver
    Excel 2007-2010
    Posts
    16

    Re: Conditional Round up or Round up Function

    oeldere the code still isnt working

  6. #6
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Conditional Round up or Round up Function

    Show the file, without confidential information; the formula is working (I tested it).

    =if(a2>0.1,int(a2)+2;int(a1)+1)

    Probably change the comma in a dot.

  7. #7
    Registered User
    Join Date
    09-18-2013
    Location
    Harare
    MS-Off Ver
    Excel 2007-2010
    Posts
    16

    Re: Conditional Round up or Round up Function

    Error.png

    This is the error I am getting it highlights on the 2 and won't evaluate anything

  8. #8
    Registered User
    Join Date
    09-18-2013
    Location
    Harare
    MS-Off Ver
    Excel 2007-2010
    Posts
    16

    Re: Conditional Round up or Round up Function

    oh now it works, but it doesn't work correctly.
    I want it to add conditionally using the decimal place i.e if the decimal is 0.1 or 1.1 or 100.1 I want it to add one to the number.
    eg 0.1 = 1
    1.1 = 2
    100.1 = 101

    then if the decimal place is above 0.4 or 1.4 or 100.4 it must add 2
    the results must be
    0.4 = 2
    1.4 = 3
    100.4=102

  9. #9
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Conditional Round up or Round up Function

    Of course also the second option A2 (instead of a1).

    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    09-18-2013
    Location
    Harare
    MS-Off Ver
    Excel 2007-2010
    Posts
    16

    Re: Conditional Round up or Round up Function

    Sorry its not working

  11. #11
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Conditional Round up or Round up Function

    Add an excel file, without confidential information.

    I will add the formula in the sheet.

  12. #12
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Conditional Round up or Round up Function

    How about =ROUND(A1+1.1,0)
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  13. #13
    Registered User
    Join Date
    09-18-2013
    Location
    Harare
    MS-Off Ver
    Excel 2007-2010
    Posts
    16

    Re: Conditional Round up or Round up Function

    i have uploaded excel sheet
    is there anyway to nest the formulae
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    09-18-2013
    Location
    Harare
    MS-Off Ver
    Excel 2007-2010
    Posts
    16

    Re: Conditional Round up or Round up Function

    Thanks for the code but it doesnt work

    See I want excel to round up using the decimal say if the decimal i.e the number after the dot
    number after dot is 1 then add one
    number after dot is 4 then add two

  15. #15
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Conditional Round up or Round up Function

    See the green cells in the attached file.

    =if(D6-INT(D6)>=$F$3,INT(D6)+2,INT(D6)+1)

    and drag down.
    Attached Files Attached Files
    Last edited by oeldere; 09-18-2013 at 03:17 PM.

  16. #16
    Registered User
    Join Date
    09-18-2013
    Location
    Harare
    MS-Off Ver
    Excel 2007-2010
    Posts
    16

    Re: Conditional Round up or Round up Function

    oeldere!

    Awsome it works wonderfully thank you so much for sticking it out!!!

  17. #17
    Registered User
    Join Date
    09-18-2013
    Location
    Harare
    MS-Off Ver
    Excel 2007-2010
    Posts
    16

    Re: Conditional Round up or Round up Function

    Thnks oeldere awsome thanks for sticking it out!!!

  18. #18
    Registered User
    Join Date
    09-16-2013
    Location
    Kansas, U.S.
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Conditional Round up or Round up Function

    I agree with the answer. However, when tried this, it failed.
    It took some time but on my laptop the result of

    1000.4 "D6-INT(D6) " resulted in .39999999999997700000 instead of .4

    1.4 resolved to .4
    10.4 resolved to .4
    100.4 resolved to .4
    but 1000.4 resolved to .39999999999997700000

    any clues as to why my particular PC can't subtract correctly ?
    Last edited by toolman_dustin; 09-18-2013 at 06:22 PM.

+ 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. Counting to a specified numberin round, then add one to round
    By McG_84 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 09-10-2013, 04:20 PM
  2. Round odd numbers for conditional formatting
    By Traymond in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-05-2009, 12:47 PM
  3. Conditional Round up
    By beets in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-08-2008, 02:44 PM
  4. VB Function Round vs Excel function Round not behaving the same Od
    By Bud in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-18-2006, 12:45 AM
  5. [SOLVED] How do I ROUND() round off decimals of a column dataset?
    By Højrup in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-12-2005, 07:06 AM

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