+ Reply to Thread
Results 1 to 10 of 10

COUNTIFS/IF/AND Formula Help

  1. #1
    Forum Contributor
    Join Date
    08-25-2013
    Location
    Virginia, USA
    MS-Off Ver
    Excel 2013
    Posts
    205

    COUNTIFS/IF/AND Formula Help

    You'll need to open the attached spreadsheet to understand this question.

    I would like to create a formula in one (or multiple) column(s) that computes the following scenario:

    IF a team lost the first game of a series (an "L" in column "E" next to a "1" in column "D") then what is the profit of that team winning EITHER game 2 or game 3. So, if after a game 1 loss the team wins game 2 then the number I'm looking for is the value of column "L" in the row containing the column with a "2" in column "D" and a "W" in column "E". If the team loses game 2 then I'd like to multiply the value of column "L" (in the row in which there is a "3" in column "D") by 2 and then add that value to the column "L" ("2" column "D") value.

    EXAMPLE 1:

    Rows 2-4....

    First game an "L", the qualifier for the formula is met. The second game was an "L" so the value of L:3 (-100) is added to the value of L:4 x 2 (-100 x 2), thus giving the answer (-300).

    EXAMPLE 2:

    Rows 21-23....

    First game an "L", the qualifier for the formula is met. The second game was an "L" so the value of L:22 (-100) is added to the value of L:23 (110 x 2), thus giving the answer of (110).

    EXAMPLE 3:

    Rows 37-39....

    First game an "L", the qualifier for the formula is met. The second game a "W" so the answer is the value of L:38 (100). L:39 x 2 IS NOT ADDED to the value of L:38 because if a "W" is reached in game 2, then the value of L:39 is not included.

    Thank you.
    Attached Files Attached Files

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: COUNTIFS/IF/AND Formula Help

    I'm having some issues following your spreadsheet, which is saved to open on Worksheet tot. Which worksheet are you referring to in your examples?

  3. #3
    Forum Contributor
    Join Date
    08-02-2013
    Location
    Wageningen, The Netherlands
    MS-Off Ver
    365
    Posts
    495

    Re: COUNTIFS/IF/AND Formula Help

    Please post a smaller example file. I have no idea what you're talking about since there are no L's in column E or 1's in column D in the default opened sheet in your file (and you have dozens of sheets)
    When I say semicolon, u say comma!

  4. #4
    Forum Contributor
    Join Date
    08-25-2013
    Location
    Virginia, USA
    MS-Off Ver
    Excel 2013
    Posts
    205

    Re: COUNTIFS/IF/AND Formula Help

    Forgive me, my mistake. The examples I listed are in tab "ari".

  5. #5
    Forum Contributor
    Join Date
    08-02-2013
    Location
    Wageningen, The Netherlands
    MS-Off Ver
    365
    Posts
    495

    Re: COUNTIFS/IF/AND Formula Help

    It's really hard to understand what you need, since you have an enormous spreadsheet and most columns don't have titles to describe what they are. Could you just give a step by step general explanation of what should happen?
    So for example start like this:
    If D1 is "1" and E1 is "L", check if E2 (next to D2="2") is "W". If so, multiply L1 with... etc

  6. #6
    Forum Contributor
    Join Date
    08-25-2013
    Location
    Virginia, USA
    MS-Off Ver
    Excel 2013
    Posts
    205

    Re: COUNTIFS/IF/AND Formula Help

    If: D2 = "1" & E2 = "L", check if D3 = "2". If D3 = "2" & E3 = "W" then show value of L3. (EXAMPLE 1&5)

    If: D2 = "1" & E2 = "L", check if D3 = "2". If D3 = "2" & E3 = "L", check if D4 = "3". If D4 doesn't = "3" then show value of L3. (EXAMPLE 4)

    If: D2 = "1" & E2 = "L", check if D3 = "2". If D3 = "2" & E3 = "L", check if D4 = "3". If D4 does = "3" then show value of L4 multiplied by 2 with L3 subtracted from that value ((L4*2)-L3). (EXAMPLE 2&3)

    "" indicates a value is present but it's not important to the formula.

    EXAMPLE 1
    --D E L (4TH COLUMN)
    2 1 L ""
    3 2 W 100 100
    4 3 "" ""

    EXAMPLE 2
    --D E L (4TH COLUMN)
    2 1 L ""
    3 2 L -100
    4 3 L -100 -300

    EXAMPLE 3
    --D E L (4TH COLUMN)
    2 1 L ""
    3 2 L -100
    4 3 W 100 100

    EXAMPLE 4
    --D E L (4TH COLUMN)
    2 1 L ""
    3 2 L -100 -100
    4 1 "" ""

    EXAMPLE 5
    --D E L (4TH COLUMN)
    2 1 L ""
    3 2 W 100 100
    4 1 "" ""
    Last edited by quibilty; 09-21-2013 at 12:16 PM.

  7. #7
    Forum Contributor
    Join Date
    08-25-2013
    Location
    Virginia, USA
    MS-Off Ver
    Excel 2013
    Posts
    205

    Re: COUNTIFS/IF/AND Formula Help

    ONE CORRECTION. Make that formula for L4, ((L4*2)+L3)

  8. #8
    Forum Contributor
    Join Date
    08-02-2013
    Location
    Wageningen, The Netherlands
    MS-Off Ver
    365
    Posts
    495

    Re: COUNTIFS/IF/AND Formula Help

    I've assumed that in the cases that you didn't mention (D2 is not 1, E2 is not L etc) you want an empty cell. And also that E3 will always be filled with either W or L.

    =IF(AND(D2=1,E2="L",D3=2),IF(E3="W",L3,IF(D4=3,L4*2+L3,L3)),"")

  9. #9
    Forum Contributor
    Join Date
    08-25-2013
    Location
    Virginia, USA
    MS-Off Ver
    Excel 2013
    Posts
    205

    Re: COUNTIFS/IF/AND Formula Help

    That is awesome! Thanks a million!

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

    Re: COUNTIFS/IF/AND Formula Help

    I've marked this thread as SOLVED for you.
    Next time, select Thread Tools from the links above to mark a thread as SOLVED. Thanks.
    _________________
    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!)

+ 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] Need help in COUNTIFS FORMULA
    By SMILE in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-04-2013, 09:22 AM
  2. COUNTIFS OR...multiple countifs without duplication in the numbers
    By HooligaD in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-21-2012, 09:53 AM
  3. Replies: 0
    Last Post: 12-16-2011, 09:01 AM
  4. Excel 2007 : COUNTIFS Formula
    By jhg1226 in forum Excel General
    Replies: 4
    Last Post: 05-02-2010, 11:40 PM
  5. Countifs formula
    By Wirral Wizard in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 02-18-2010, 08:47 AM

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