+ Reply to Thread
Results 1 to 3 of 3

How to do multiple if and or statments

  1. #1
    Registered User
    Join Date
    04-06-2009
    Location
    USA
    MS-Off Ver
    Office 2007
    Posts
    20

    Question How to do multiple if and or statments

    Ok here's the story.

    I'm making a spreadsheet for the Red Sox season record. I have multiple information being decided just from the scores, as in; the record for Vs East, Vs West, etc.

    I have all of those being counted correctly. However I want to go one step farther with determining the winner of the game.

    Right now in Colum F I have two differently formulas. If Boston is home then I have the following formula:

    =IF(AND(D2="", E2=""),"",IF(D2<E2,"Win", "Loss"))

    If there away I have the following formula:

    =IF(AND(D5="", E5=""),"",IF(D5>E5,"Win", "Loss"))

    While that works for me, I have to manually put that formula in there deciding upon if their home or away.

    What I want to be able it to do is:

    If D2 and E2 are blank then nothing else. If B2 equals home than (the home formula) or if B2 equals away than (the away formula).

    The reason I want this is I want to be able to give this to my friends who only need to input the data, not the formulas.
    Attached Files Attached Files
    Last edited by preferiti; 04-06-2009 at 07:24 PM.

  2. #2
    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 do multiple if and or statments

    Try this:

    =IF(AND(D2="",E2=""),"",IF(B2="Home",IF(D2<E2,"Win","Loss"),IF(D2<E2,"Loss","Win")))
    _________________
    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!)

  3. #3
    Registered User
    Join Date
    04-06-2009
    Location
    USA
    MS-Off Ver
    Office 2007
    Posts
    20

    Re: How to do multiple if and or statments

    Thanks so much. The funny thing is i had that formula, but i had another if and statment in there for if B2=Away. thanks again.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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