+ Reply to Thread
Results 1 to 7 of 7

Need If-Then statement formula using multiple variables.

  1. #1
    Registered User
    Join Date
    05-05-2009
    Location
    Milwaukee, Wisconsin
    MS-Off Ver
    Excel 2007
    Posts
    5

    Need If-Then statement formula using multiple variables.

    I have the following range of information available:

    0% through 10% = 0.0% standard rate
    11% through 14% = 2.0% standard rate
    15% through 18% = 2.5% standard rate
    19%+ = 3.0% standard rate

    If an acocunt is designated as type "N", then the rate applied is whatever the standard rate is plus 1%.

    If an account is designated as type "D1", then the rate applied is whatever the standard rate is multiplied by .75

    If an account is designated as type "D2", then the rate applied is whatever the standard rate is multiplied by .5

    -------------------------------------------------------------------------
    I have set up sheet1 as follows:

    Column A, Row 1 = 0 (beginning of range)
    Column B, Row 1 = .1 (end of range)
    Column C, Row 1 = 0 (standard rate applied)
    Column A, Row 2 = .11 (begin of range)
    Column B, Row 2 = .14 (end of range)
    Column C, Row 2 = .02 (standard rate)
    Column A, Row 3 = .15 (begin of range)
    Column B, Row 3 = .18 (end of range)
    Column C, Row 3 = .025 (standard rate)
    Column A, Row 4 = .19 (begin of range)
    Column B, Row 4 = 1.00 (end of range)
    Column C, Row 4 = .03 (standard rate)

    Column E, Row 1 = D2
    Column E, Row 2 = .18225 (an example of a value within a range)
    Column E, Row 3 = (If, then statement)

    My hope is that when the if-then statement is implemented, the result using the example given would be .0125 (.025 standard rate multiplied by .5). If I change Column E, Row 1 to 'N', then I would expect the result to be .035 (.025 standard rate plus .01). If I then change Column E, Row 2 to .21285, I would expect the result to be .04 (.03 standard rate plus .01).

    Can anyone help me solve this?

    Thanks,

    MidCon

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Need If-Then statement formula using multiple variables.

    Try

    =Lookup(E2,{0,.11,.15,.19},{0,.02,.025,.03})*Lookup(E1,{"D1","D2","N"},{.01,.75,.5})
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Need If-Then statement formula using multiple variables.

    I just noticed that you posted in the Access Forum.. is that what you intended?

    My solution is an Excel solution.

  4. #4
    Registered User
    Join Date
    05-05-2009
    Location
    Milwaukee, Wisconsin
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Need If-Then statement formula using multiple variables.

    Oops. It looks I posted in the wrong forum. I'll try what you advised. Thanks.

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Need If-Then statement formula using multiple variables.

    Quote Originally Posted by MidCon View Post
    Oops. It looks I posted in the wrong forum. I'll try what you advised. Thanks.
    I just moved it for you.. was waiting verification.

  6. #6
    Registered User
    Join Date
    05-05-2009
    Location
    Milwaukee, Wisconsin
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Need If-Then statement formula using multiple variables.

    Quote Originally Posted by NBVC View Post
    Try

    =Lookup(E2,{0,.11,.15,.19},{0,.02,.025,.03})*Lookup(E1,{"D1","D2","N"},{.01,.75,.5})
    That doesn't quite work. My boss would like to utilize something that he can easily change the variables. The lookup you gave accomplishes that with the "D1" "D2" and "N". However it does not accomplish that with the percentages of 0, .02, .025, & .03 because they are buried within the lookup statement and not visible on the spreadsheet itself.

    Thanks!

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Need If-Then statement formula using multiple variables.

    You can just as well create 2 tables in the spreadsheet and reference them in the formula instead..

    eg.

    =Lookup(E2,X1:Y4)*Lookup(E1,Z1:AA3)

    Where X1:Y4 contains data for the E2 lookup.. and Z1:AA3 contains data for the E1 lookup...

    Note: the data in the 1st columns of each table must be in ascending sorted order.

+ 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