+ Reply to Thread
Results 1 to 4 of 4

Excel 2007 : Sum columns by criteria

  1. #1
    Registered User
    Join Date
    06-20-2011
    Location
    vilnius
    MS-Off Ver
    Excel 2003
    Posts
    7

    Question Sum columns by criteria

    how to sum range of B:V columns by criteria sum range is B:V
    criteria range1 is A:A
    criteria1 = "apple"
    criteria range2 is row 1
    criteria2 = "AN"

    the formula sumifs(B:V;A:A;"apple";1:1;"AN") return error? what is wrong?
    array formula does not good for me because i have to calculate a lot of fields.
    Attached Images Attached Images
    Last edited by rawas; 06-20-2011 at 06:09 AM.

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

    Re: Sum columns by criteria

    Try

    =SUMPRODUCT(($A$2:$A$10="apple")*($B$1:$V$1="AN"),$B$2:$V$10)

    adjust ranges to suit and do not use whole column references.
    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
    06-20-2011
    Location
    vilnius
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Sum columns by criteria

    Quote Originally Posted by NBVC View Post
    Try

    =SUMPRODUCT(($A$2:$A$10="apple")*($B$1:$V$1="AN"),$B$2:$V$10)

    adjust ranges to suit and do not use whole column references.
    but i have dinamic range? and array formula has defekt its return error if value in sum range is N/A

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

    Re: Sum columns by criteria

    If you posted an actual workbook instead of a picture of part of it, and telling us about dynamic ranges in advance... you may get more accurate results the first time. What do you mean by defect?

    How are the dynamic ranges defined?

+ 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