+ Reply to Thread
Results 1 to 4 of 4

Sumif?

  1. #1
    Registered User
    Join Date
    02-05-2004
    Posts
    48

    Sumif?

    Hi - I am trying to sum a column - horizontally - based on a criteria listed vertically.

    Tried the following forumula

    =SUMIF($B$31:$B$231,$G$2,$D$31:$H$231)

    List of values (text) is in - $B$31:$B$231
    Criteria value (text) is in $G$2
    List of values (numbers) to sum, if they match the value (text) in G2 - $D$31:$H$231

    Result I'm getting is just the value in the first column (D) of the sum range, not the values also in columns E, F, G and H, matching the criteria.

    What I'm wanting is the sum of all the values in the columns horizontally in the range if they match the criteria cell.

    Any help appreciated.

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Sumif?

    Hi Ntisch,

    You might want to try this instead:

    =SUMPRODUCT((B31:B231=$G$2)*(D31:H231))

    Hope that helps!

  3. #3
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Sumif?

    Message deleted.

  4. #4
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Sumif?

    No need to delete your solution, JieJenn. In fact, we frown upon it.

    From what I saw it looked like it would work, and be logically easy to follow; it just wasn't as short as mine. No better or worse, just different.

    I believe it went something like:

    =SUMIF($B$31:$B$231,$G$2,$D$31:$D$231)+SUMIF($B$31:$B$231,$G$2,$E$31:$E$231)+SUMIF($B$31:$B$231,$G$2,$F$31:$F$231)+SUMIF($B$31:$B$231,$G$2,$G$31:$G$231)+SUMIF($B$31:$B$231,$G$2,$H$31:$H$231)

+ 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