+ Reply to Thread
Results 1 to 4 of 4

Roundup to even number?

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    11-20-2008
    Location
    UK
    MS-Off Ver
    Office 365 For Mac Excel Version 16.88
    Posts
    143

    Question Roundup to even number?

    Bit of an odd one this and beyond my newbie Excel skills.

    One cell in my sheet, L15, will have a decimal number in it like 1.34, 6.78 etc. I now need another cell to do the following.

    If L15 = 0.00 return nothing leave the cell blank
    If L15 = >1 but <2 return 2 (so to round up)
    If L15 = >2 but <3 return 3 (so to round up)
    If L15 = >3 but <4 return 4 (so to round up)
    If L15 = >4 but <6 return 6 (so to round up but round up to the next even number)
    If L15 = >6 but <8 return 8 (so to round up but round up to the next even number)
    etc

    Basically if the value of L15 is less than 4.00 it should return the next rounded up number but if L15 is greater than 4 it should return the next even number 6,8,10,12 etc. In reality it probably only needs to cope with a value up to 20 if that makes a difference. I don't really know how to write this without exceeding the number of nested statements I have in Excel 2003. Anyone know a way of doing this?

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Roundup to even number?

    peakoverload,

    Give this a try:
    =CEILING(L15,1+(L15>4))
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Contributor
    Join Date
    11-20-2008
    Location
    UK
    MS-Off Ver
    Office 365 For Mac Excel Version 16.88
    Posts
    143

    Re: Roundup to even number?

    Wow that is Genius! I would never have thought it was possible to do all of that so succinctly! You should have seen my first attempt! LOL

    Thank you so much

    Quote Originally Posted by tigeravatar View Post
    peakoverload,

    Give this a try:
    =CEILING(L15,1+(L15>4))

  4. #4
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Roundup to even number?

    you're very welcome

+ 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