+ Reply to Thread
Results 1 to 3 of 3

Formula to Roundup Negative Number to zero, and...

Hybrid View

  1. #1
    Registered User
    Join Date
    08-24-2011
    Location
    us
    MS-Off Ver
    Excel 2010
    Posts
    4

    Formula to Roundup Negative Number to zero, and...

    So I have the following cells:
    1 0.2
    -2 0

    Assuming the second line is row E, I used =MAX(0,E2/5) to round my negative results to zero. I also want to add to this formula and use it on all of my values so that positive numbers will be rounded up. For example above, assuming the first row is D, I would like the answer to be 1 instead of 0.2 (the result of =MAX(0,D2/5). I want it to be
    =ROUNDUP(D2/5,0), which would equal 1.

    How can I combine these to work together to round my negative values to zero, but also round my positive numbers up?

    Sorry if this is confusing, as I am an excel amateur.

    Pete

  2. #2
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Formula to Roundup Negative Number to zero, and...

    Perhaps like this:

    =ROUNDUP(MAX(0,D2/5),0)
    Cheers,
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  3. #3
    Registered User
    Join Date
    08-24-2011
    Location
    us
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Formula to Roundup Negative Number to zero, and...

    Quote Originally Posted by ConneXionLost View Post
    Perhaps like this:

    =ROUNDUP(MAX(0,D2/5),0)
    Cheers,
    Excellent. I was forgeetting the last zero. Your the best!

+ 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