+ Reply to Thread
Results 1 to 6 of 6

Function for a range of numbers

  1. #1
    Registered User
    Join Date
    01-16-2014
    Location
    uk
    MS-Off Ver
    Excel 2013
    Posts
    99

    Function for a range of numbers

    Hi

    I am looking for a function that gives a range of numbers a score, here is what i need:

    if A1 is between 6&15 B1=25 if A1 is between 16&35 B1=15 if A1 is between 36&65 B1=5 if A1 is 66 or more B1=0


    Thank you

  2. #2
    Forum Contributor
    Join Date
    01-30-2013
    Location
    Wales
    MS-Off Ver
    Excel 2013
    Posts
    231

    Re: Function for a range of numbers

    if(a1>65,0,if(a1>35,5,if(a1>15,15,if(a1>5,25,"Nothing specified for this"))))
    Click * below if this answer helped

  3. #3
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Function for a range of numbers

    hi MATU. try:
    =LOOKUP(A1,{6,16,36,66},{25,15,5,0})

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  4. #4
    Registered User
    Join Date
    01-16-2014
    Location
    uk
    MS-Off Ver
    Excel 2013
    Posts
    99

    Re: Function for a range of numbers

    Hi benishiryo

    that formula is great and works but when no data is in A1 B1 returns #N/A , How do i get rid of the error?

  5. #5
    Registered User
    Join Date
    12-28-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: Function for a range of numbers

    Hi,

    You can use Iferror formula to avoid such error...

    =IFERROR(LOOKUP(A1,{6,16,36,66},{25,15,5,0}),"")

  6. #6
    Registered User
    Join Date
    01-16-2014
    Location
    uk
    MS-Off Ver
    Excel 2013
    Posts
    99

    Re: Function for a range of numbers

    Thank you K.Raja

    Your a STAR

+ 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. Outputting a Range of numbers to a print function
    By PatsFan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-12-2012, 06:28 AM
  2. Replies: 3
    Last Post: 04-16-2012, 03:09 PM
  3. Replies: 3
    Last Post: 01-13-2012, 06:31 PM
  4. IF function for a range of numbers within another range
    By deafmetal in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-27-2008, 08:18 AM
  5. [SOLVED] Worksheet function for range of numbers
    By brendan_doc in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-09-2006, 02:20 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