+ Reply to Thread
Results 1 to 10 of 10

sum => sumif ; max ==> maxif??

  1. #1
    Registered User
    Join Date
    01-09-2007
    Posts
    6

    sum => sumif ; max ==> maxif??

    There is a function sumif() that is used for do sum() under condition

    Nevertheless, if I want to do max() under condition, how can I do?

    There isn't a function maxif().

  2. #2
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by c_ka_kit
    There is a function sumif() that is used for do sum() under condition

    Nevertheless, if I want to do max() under condition, how can I do?

    There isn't a function maxif().
    Hi,

    you need to modify

    =MAX(IF(C1:C12=1,D1:D12))

    CSE (CTRL/Shift/Enter)

    to suit your data

    ---
    Si fractum non sit, noli id reficere.

  3. #3
    Registered User
    Join Date
    01-09-2007
    Posts
    6
    Thank . by my problem is not yet solved.

    =MAX(IF(C1:C12=1,D1:D12))

    gives max(D1:D12) always. when C column is 1.

    However, I need to get Max(D1, D2, D12) if C1=1 and C2=1 and C12=1.

    sumif and countif can do such filtering sum and count.

    Any idea??

  4. #4
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by c_ka_kit
    Thank . by my problem is not yet solved.

    =MAX(IF(C1:C12=1,D1:D12))

    gives max(D1:D12) always. when C column is 1.

    However, I need to get Max(D1, D2, D12) if C1=1 and C2=1 and C12=1.

    sumif and countif can do such filtering sum and count.

    Any idea??
    ok - then

    =IF(AND(C1=1,C2=1,C12=1),MAX(D1,D2,D12),"")

    ---

  5. #5
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326
    Other possibility:
    =IF(c1*c2*c12=1,MAX(D1,D2,D12),"")

  6. #6
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by arthurbr
    Other possibility:
    =IF(c1*c2*c12=1,MAX(D1,D2,D12),"")
    but that works for
    2 1 0.5

    --

  7. #7
    Registered User
    Join Date
    01-09-2007
    Posts
    6
    "C1=1,C2=1,C12=1" is only an example condition.

    The general request statement is

    "For any row that C column cell is 1, the D column data is to be taken and finally, find the max of these D data. "

  8. #8
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by c_ka_kit
    "C1=1,C2=1,C12=1" is only an example condition.

    The general request statement is

    "For any row that C column cell is 1, the D column data is to be taken and finally, find the max of these D data. "
    please be specific, my first formula did this, which you then requested as C1 C2 and C12 all = 1

    You may need to supply a sample with your expected answer.

    ---
    added, note as per the statement, you need to enter the formula with CTRL/SHIFT/Enter (not just Enter)
    Last edited by Bryan Hessey; 01-10-2007 at 07:08 AM.

  9. #9
    Registered User
    Join Date
    01-09-2007
    Posts
    6

    Ok!

    OK! The "CSE" works. Thank You.

  10. #10
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by c_ka_kit
    OK! The "CSE" works. Thank You.
    always for 'array' formula, good to see it works for you, and thanks for the response.

    ---

+ 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