+ Reply to Thread
Results 1 to 7 of 7

condition decide the range and SUM of the multiple condition

  1. #1
    Forum Contributor
    Join Date
    03-19-2010
    Location
    singapore
    MS-Off Ver
    Excel 2019
    Posts
    178

    condition decide the range and SUM of the multiple condition

    i need a formula can decide a range according the between value and SUM of the frequency of the range.

    sorry, so difficult to explain in English. please refer to the picture below.

    thanks very much
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by choy96; 05-06-2010 at 10:06 PM.

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

    Re: condition decide the range and SUM of the multiple condition

    Change B13 to 0, B14 to 41 and B15 to 81 and (assuming you want to look up average of the 5 columsn), then try In I3 :

    =LOOKUP(LOOKUP(AVERAGE(D3:H3),$B$13:$C$15),{"A","B","C"},{1,2,3})

    copied down

    In M3, try:

    =SUMPRODUCT(--($I$3:$I$11=M$2),--($A$3:$A$11=$L3))

    copied down and across the table
    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
    Forum Contributor
    Join Date
    03-19-2010
    Location
    singapore
    MS-Off Ver
    Excel 2019
    Posts
    178

    Re: condition decide the range and SUM of the multiple condition

    i have trying use the formula on other table, the maximum value will decide the range, but it show me error.
    =IF(B10=MANGO,LOOKUP(Q10,$V$3:$V$5,{"S","A","B"}),"")
    refer to picture below.
    Please help ......
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by choy96; 05-01-2010 at 10:32 AM.

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

    Re: condition decide the range and SUM of the multiple condition

    See attached... Condition 2-1.xls

    You need to include text string, Mango in double-quotes.

    I also assumed you wanted to look for Kiwi...

    so formula should be:

    =IF(B10="MANGO",LOOKUP(Q10,$V$3:$V$5,$U$3:$U$5),IF(B10="Kiwi",LOOKUP(Q10,$V$16:$V$18,$U$16:$U$18),""))

    However to make it cleaner and if you have multiple fruit tables, then you should re-arrange the table as per Condition 2-2.xls file and then name each table as per the fruits.. See Insert|Name|Define to see the 2 tables I created, then the formula in S10 would be simply:

    =LOOKUP(Q10,INDIRECT(B10))

    In both workbooks, the formula in E20 is:

    =SUMPRODUCT(--($S$10:$S$16=E$18),--($R$10:$R$16=$B20)) copied down and across and in E24:

    =SUMPRODUCT(--($S$10:$S$16=E$23),--($R$10:$R$16=$B24))

    copied down and across.
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    03-19-2010
    Location
    singapore
    MS-Off Ver
    Excel 2019
    Posts
    178

    Re: condition decide the range and SUM of the multiple condition

    When data E7 did not provide for =VLOOKUP(E17,$U$10:$V$21,2,FALSE) , it will become error on B21. it also will cause =SUMPRODUCT(--(S10:S17=E19),--(R10:R17=B21)) become error.
    can i have a formula will not error occur when data haven't key in yet?

    thanks.
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by choy96; 05-02-2010 at 10:14 AM.

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

    Re: condition decide the range and SUM of the multiple condition

    Try, in R10

    =IF(ISNUMBER(MATCH(E10,$U$10:$U$21,0)),VLOOKUP(E10,$U$10:$V$21,2,FALSE),"")

    copied down

  7. #7
    Forum Contributor
    Join Date
    03-19-2010
    Location
    singapore
    MS-Off Ver
    Excel 2019
    Posts
    178

    Re: condition decide the range and SUM of the multiple condition

    wow ... it working. thanks very much

+ 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