+ Reply to Thread
Results 1 to 3 of 3

Number should stay in a certain range

  1. #1
    Registered User
    Join Date
    01-31-2012
    Location
    manhattan
    MS-Off Ver
    Excel 2007
    Posts
    6

    Number should stay in a certain range

    i need a formula that would round up and down to a certain number

    for example if cell a2 is greater than 25 (like 30) it should roundown to 25, if its lower than 15 (like 11) it should roundup to 15, if its 18 it should not change

    meaning only numbers that are out of my range (between 15-25) should change to closest low or high number

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,732

    Re: Number should stay in a certain range

    you can probably do it with a different formula
    BUT I would do

    =IF( a2>25, 25, IF( A2<15, 15, A2))
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Number should stay in a certain range

    Hi,


    just for fun

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    etaf's formula is for sure better.

    Cheers
    -----------------------------------------------------

    At Excelforum, you can say "Thank you!" by clicking the star icon ("Add Reputation") below the post.

    Please, mark your thread [SOLVED] if you received your answer.

+ 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. Replies: 0
    Last Post: 02-06-2013, 11:16 AM
  2. Replies: 0
    Last Post: 12-22-2011, 09:27 AM
  3. Need Max(Cell Range) to stay the same
    By miekewl in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-28-2011, 03:04 AM
  4. Replies: 2
    Last Post: 07-11-2006, 03:40 PM
  5. Replies: 1
    Last Post: 05-26-2005, 05:15 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