+ Reply to Thread
Results 1 to 8 of 8

Need help creating a formula

Hybrid View

  1. #1
    Registered User
    Join Date
    01-23-2014
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    4

    Need help creating a formula

    I need to create a formula for returning the tax brackets based on Income.

    If value is between 0 and 9225, returns 10%
    If value is between 9226 and 37450, returns 15%
    and so on

    Thanks in Advance

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Need help creating a formula

    Try something like this...

    Data Range
    A
    B
    C
    D
    E
    F
    1
    Value
    Rate
    ------
    From
    To
    Rate
    2
    52226
    27%
    0
    9225
    10%
    3
    9226
    37450
    15%
    4
    37451
    50000
    22%
    5
    50001
    66225
    27%
    6
    66226
    89350
    35%
    7
    89351
    89351+
    45%


    This formula entered in B2:

    =LOOKUP(A2,D2:F6)

    On a side note, please change the thread title to something more specific. "They" don't like ambiguous thread titles at this forum.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Need help creating a formula

    P.S.

    You don't actually need the "To" column but I included it to make it easier to see the complete range.

  4. #4
    Registered User
    Join Date
    01-23-2014
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Need help creating a formula

    So I understand that the range is D2 to F6 but how does the formula decide to find a value between D and E and return the value in F? I didn't think Lookup would be the appropriate formula because I didn't know how to structure a range to do so. (If the answer is, "It just does", I'm cool with that)

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Need help creating a formula

    Quote Originally Posted by duncanmc831 View Post
    If the answer is, "It just does", I'm cool with that
    That's pretty much it.

    It looks for the lookup_value in the left-most column and returns the value from the corresponding right-most column.

  6. #6
    Registered User
    Join Date
    04-30-2014
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    70

    Re: Need help creating a formula

    Quote Originally Posted by duncanmc831 View Post
    So I understand that the range is D2 to F6 but how does the formula decide to find a value between D and E and return the value in F? I didn't think Lookup would be the appropriate formula because I didn't know how to structure a range to do so. (If the answer is, "It just does", I'm cool with that)
    Duncan, this may help you understand better:

    LOOKUP is referencing the values in the vector of column D. It searches until it can find a match. If it cannot find the lookup_value, then it matches the largest value in the lookup vector that is less than or equal to lookup value. That's why when it searches for "52226" in column D and it cannot find it, it resorts to using the closest match that is less than the lookup value, which is "50001" and it outputs 27%

  7. #7
    Registered User
    Join Date
    01-23-2014
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Need help creating a formula

    OK so its not actually looking at ANYTHING in the E column. What you are saying is if it is less than or equal to the value in D (the left most) it returns the value in F (the right most)?

    Thank you so much Mr. Valko

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Need help creating a formula

    Quote Originally Posted by duncanmc831 View Post
    OK so its not actually looking at ANYTHING in the E column.
    Correct

    I think it's easier to read the table if there's a From and To range.

    Thank you so much Mr. Valko
    You're welcome. Thanks for the feedback!

+ 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. [SOLVED] Use an existing cell formula for creating a new more complex formula
    By dubcap01 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-23-2014, 07:41 AM
  2. Replies: 1
    Last Post: 11-21-2012, 02:03 AM
  3. Creating an If formula
    By valandil in forum Excel General
    Replies: 2
    Last Post: 03-16-2010, 11:02 PM
  4. need help with creating or using a formula
    By apehyes in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-29-2005, 02:24 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