+ Reply to Thread
Results 1 to 5 of 5

How to write a if and statement with two variables and six possible outcomes?

  1. #1
    Registered User
    Join Date
    07-14-2015
    Location
    Detroit, MI
    MS-Off Ver
    Microsoft Excel 2010
    Posts
    2

    How to write a if and statement with two variables and six possible outcomes?

    I'm trying to create an investment allocation spreadsheet. There are two variables, Income (yes/no) and risk tolerance (0-4,5-7,8-10). There are 6 answers. How would I write the if and statement to allow for the two variables and generate the 6 answers?

    Please Login or Register  to view this content.
    Last edited by JBeaucaire; 07-14-2015 at 02:14 PM.

  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: How to write a if and statement with two variables and six possible outcomes?

    Like this...

    Data Range
    A
    B
    C
    D
    E
    F
    1
    Risk Tolerance
    Yes
    No
    Risk Tolerance
    No
    2
    0
    0-20%
    0-30%
    5
    30-60%
    3
    5
    20-40%
    30-60%
    4
    8
    50-80%
    60-90%
    5
    ------
    ------
    ------
    ------
    ------
    ------


    This formula entered in F2:

    =VLOOKUP(E2,A2:C4,MATCH(F1,A1:C1,0))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How to write a if and statement with two variables and six possible outcomes?

    Like so:
    Data Range
    A
    B
    C
    D
    E
    F
    G
    H
    I
    1
    Income
    2
    Risk Tolerance
    Yes
    No
    Risk
    Income
    Percentage
    3
    0
    0-20%
    0-30%
    3
    No
    0-30%
    =INDEX($B$3:$C$5, MATCH(F3, $A$3:$A$5, 1), MATCH(G3, $B$2:$C$2, 0))
    4
    5
    20-40%
    30-60%
    7
    Yes
    20-40%
    5
    8
    50-80%
    60-90%
    9
    Yes
    50-80%
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Registered User
    Join Date
    07-14-2015
    Location
    Detroit, MI
    MS-Off Ver
    Microsoft Excel 2010
    Posts
    2

    Re: How to write a if and statement with two variables and six possible outcomes?

    Thanks for the help.
    Last edited by Tyler1234; 07-14-2015 at 02:53 PM.

  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: How to write a if and statement with two variables and six possible outcomes?

    You're welcome!


    If your question has been solved please mark the thread as being solved.

    In the menu bar above the very first post select Thread Tools, then select Mark this thread as solved.

+ 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. If statement with 3 outcomes
    By Rgauer in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-23-2014, 06:07 AM
  2. [SOLVED] Multiple outcomes from 2 variables. How to write the formula
    By CountryBoy90 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-13-2014, 06:02 AM
  3. [SOLVED] Multiple outcomes with mulitple variables
    By Mountain99 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 08-05-2013, 09:50 AM
  4. help with formula with 3 outcomes and several variables.
    By NICK W in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-10-2013, 02:31 AM
  5. [SOLVED] If statement three outcomes
    By Danimal615 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-05-2013, 02:36 PM
  6. Nested If statement for 3 outcomes
    By lmb23 in forum Excel General
    Replies: 2
    Last Post: 01-12-2011, 04:51 PM
  7. IF statement using multiple variables to give multiple outcomes
    By stujordan in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-06-2009, 06:46 AM

Tags for this Thread

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