+ Reply to Thread
Results 1 to 4 of 4

ROUNDDOWN & ROUNDUP in same formula?

  1. #1
    Registered User
    Join Date
    11-22-2010
    Location
    Salt Lake City, UT
    MS-Off Ver
    Professional Plus 2013
    Posts
    54

    Question ROUNDDOWN & ROUNDUP in same formula?

    Here is my situation. I track product for shipping and convert pieces into shippable cases. If I don't have enough product to fill a case, I have my excel sheet round down so I know how many full cases I have. If my product is in the negative (for estimations), I'd like it to round up so I can see how many full cases I am potentially in the hole. Right now I have the column I track this with set to rounddown only, so it doesn't work for the negative numbers. Can I get both round up and round down in one formula?

    Thanks!

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: ROUNDDOWN & ROUNDUP in same formula?

    HI Grasshoper,

    Can you share a sample excel workbook along with expected results. thanks.


    Regards,
    DILIPandey
    <click on below * if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: ROUNDDOWN & ROUNDUP in same formula?

    You will have to create two formulas, one to roundup, one to rounddown. Then use a IF/THEN/ELSE test to decide which formula to use.

    =IF(A1<0, ROUNDUP(formula), ROUNDDOWN(formula))
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Registered User
    Join Date
    11-22-2010
    Location
    Salt Lake City, UT
    MS-Off Ver
    Professional Plus 2013
    Posts
    54

    Re: ROUNDDOWN & ROUNDUP in same formula?

    Quote Originally Posted by JBeaucaire View Post
    You will have to create two formulas, one to roundup, one to rounddown. Then use a IF/THEN/ELSE test to decide which formula to use.

    =IF(A1<0, ROUNDUP(formula), ROUNDDOWN(formula))
    I will try this at work on Monday. Thank you.

    DILIPandey, I have tried uploading sheets before without success, I'm not sure what I end up doing wrong. Thank you for your offer, though.

+ 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