+ Reply to Thread
Results 1 to 4 of 4

Multi conditions in countif and sumif HELP

  1. #1
    Registered User
    Join Date
    08-21-2007
    Posts
    4

    Multi conditions in countif and sumif HELP

    Hi! I am trying to tabulate data count and also conduct summation with multiple conditions:

    logic: countif (A1:A99=true AND B1:B99="Open" AND C1:C99="Q1")
    logic: if (A1:A99="X"), sum (corresponding columns), else ("check")

    It would be great if you can either post the reply or PM me; I can send a sample spreadsheet should my post is not clear.

    Thanks for your help!

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    For any journey one makes
    Even if the displacement equates to zero
    Something is being gained
    For the distance travelled is certainly not zero
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

    =SUMPRODUCT(--(A1:A99=true),--(B1:B99="Open"),--(C1:C99="Q1"))

    =IF(COUNTIF(A1:A99,"X"),SUMIF(A1:A99,"X",(corresponding columns)),"Check")
    Last edited by NBVC; 08-22-2007 at 12:08 PM.
    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
    Registered User
    Join Date
    08-21-2007
    Posts
    4
    I was not able to get it to work, NBVC. The data I am looking for is as such based on the data. Please help! Thanks!!

    Table Disired:
    Row/Col AA BB CC DD
    1 INDICATORS Causal Business Cost
    2 paris
    3 phnom penh
    4 lima
    5 nairobi
    6 santou
    7 Open
    8 Closed

    cell BB2 logic: countif (G2:G22=true AND F2:F22=BB1 AND B2:B22=AA2)
    cell CC6 logic: countif (G2:G22=true AND F2:F22=CC1 AND B2:B22=AA6)

    cell DD6 logic: sum (D2:E22) if(G2:G22=true AND F2:F22=CC1 AND B2:B22=AA6)


    Sample data:

    Row/Col A B C D E F G
    1 Case City Status CostA CostB Type Logic
    2 111 paris Open 0.00 0.00 business TRUE
    3 112 nairobi Open 0.00 0.00 business TRUE
    4 113 nairobi Open 0.00 0.00 casual TRUE
    5 113 nairobi Open 0.00 0.00 FALSE
    6 113 nairobi Open 0.00 65.00 FALSE
    7 113 nairobi Open 80.00 85.00 FALSE
    8 113 nairobi Open 0.00 0.00 FALSE
    9 114 lima Closed 14.00 12.00 casual TRUE
    10 115 phnom penh Closed 0.00 25.00 business TRUE
    11 115 phnom penh Closed 0.00 0.00 FALSE
    12 115 phnom penh Closed 0.00 0.00 FALSE
    13 116 nairobi Open 0.00 20.00 casual TRUE
    14 116 nairobi Open 30.00 0.00 FALSE
    15 117 lima Open 0.00 0.00 business TRUE
    16 118 santou Open 0.00 0.00 casual TRUE
    17 119 paris Closed 0.00 0.00 business TRUE
    18 120 phnom penh Closed 100.00 0.00 casual TRUE
    19 120 phnom penh Closed 0.00 10.00 FALSE
    20 120 phnom penh Closed 0.00 25.00 FALSE
    21 121 santou Closed 0.00 50.00 casual TRUE
    22 122 santou Open 0.00 0.00 TRUE

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


    BB2: =SUMPRODUCT(--(G2:G22=true),--(F2:F22=BB1),--(B2:B22=AA2))

    CC6: =SUMPRODUCT(-(G2:G22=true),--(F2:F22=CC1),--(B2:B22=AA6))

    DD6: =SUMPRODUCT(--(G2:G22=true),--(F2:F22=CC1),--(B2:B22=AA6),D2:E22)


    If still not working, post your sheet zipped.

+ 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