+ Reply to Thread
Results 1 to 5 of 5

Formula to determine whether value lies within range...

  1. #1
    Registered User
    Join Date
    12-13-2011
    Location
    NYC, NY
    MS-Off Ver
    Excel 2003
    Posts
    2

    Formula to determine whether value lies within range...

    What do I do if I want to determine whether an input is within a specified range, and then for there to be an output of a certain value from another cell?

    For example, with tax brackets, if income (D) falls within B and C, return value A(from a separate column)?

    Here is the data I have:


    Column A

    "Formula referencing D1"
    "Formula referencing D1"
    "Formula referencing D1"
    "Formula referencing D1"
    "Formula referencing D1"


    Column B

    0
    34500
    83600
    174400
    379500

    Column C

    34500
    83600
    174400
    379500
    "infinity?"

    Basically, what I want is a formula to put into column E that will do two things. First, to determine if the value in D1 is within either (B1-C1, B2-C2, B3-C3, B4-C4, or B5-C5). Second, to then output the value of either A1, A2, A3, A4, or A5, for each respective range.

    Does that make any sense?! I tried to make it clear :/ Thanks so much guys!
    Last edited by Dpan131; 12-13-2011 at 06:00 PM. Reason: mistake!

  2. #2
    Registered User
    Join Date
    12-06-2011
    Location
    Arkansas, USA
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Formula to determine whether value lies within range...

    It would be a lot easier if you would put the example data into a worksheet which you attach to the post. One way that might work is to have a set of nested IF statements. Your conditions would start with the smallest or largest and do a comparison (less than or greater than). If it fails comparison, then output the percent for the highest or lowest bracket depending on where you started. If it passes, do another IF for the next threshold down. If you'll put some sample data into a worksheet I'll see if I can make it clearer.

    Edit: Try this - File attached
    Attached Files Attached Files
    Last edited by ATufts; 12-13-2011 at 06:53 PM. Reason: Attach File

  3. #3
    Registered User
    Join Date
    12-13-2011
    Location
    NYC, NY
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Formula to determine whether value lies within range...

    Thank you for the example. The issue there is in E1. I would want the value in E1 to be 0.15, since 80000 is within 83600 and 177400. Thus I want the value returned to be from A3.

    I did try the nested IF statements myself at one point, but there were too many and I got some sort of error.

    Ugh, sorry, I just realized that I can't attach the sheet because I'm using "Numbers" on my iMac.

  4. #4
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Formula to determine whether value lies within range...

    Hello
    A lookup will do that..

    Please Login or Register  to view this content.
    BTW you don't need column c anymore...

    Cheers.
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  5. #5
    Registered User
    Join Date
    12-06-2011
    Location
    Arkansas, USA
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Formula to determine whether value lies within range...

    vlady got it better than I did. I was unfamiliar with the lookup function, learn something new everyday! If you wanted to modify the formula in the example that I gave, you would just need to remove the *D1 portions of the IF functions and it would return the same result.

+ 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