+ Reply to Thread
Results 1 to 4 of 4

Summing a column with two intersecting conditions?

  1. #1
    Registered User
    Join Date
    08-26-2008
    Location
    NY
    Posts
    12

    Summing a column with two intersecting conditions?

    I have a excel spread sheet where I wish to sum a column based on the outcome of two other columns.

    A B C
    5 Normal High
    10 Abnormal High
    15 Normal Low

    Now if I wish to sum those numbers in column A which are Normal (for B) and Low (For C) then how would I go about doing that. I was attempting to use an array formula but was having many issues. So far I have this...

    =SUM(IF($M$16:$M$838="Normal", IF($R$16:$R$838="Interval 1", $N$16:$N$838,0),0))

    But the number it gives me I know is wrong, it ends up summing everything in the column rather then the selected ones.

    The variables are different but I hope the message got across.

  2. #2
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326
    Hi and welcome to the board
    You may try
    =SUMPRODUCT(($M$16:$M$838="Normal")*($R$16:$R$838="Interval 1") *$N$16:$N$838)

    HTH

  3. #3
    Registered User
    Join Date
    08-26-2008
    Location
    NY
    Posts
    12
    Thank you that worked great.

    I was wondering if I wanted to make the second condition a time variable, ie add those numbers between a certain time.

    I had come up with the following, however it is adding all numbers that which are normal and not the ones between those specific times. Do I have the time part of the equation correct? I actually needed it for 3 different time period, 6am-6pm, 6pm-12am, and 12am-6am. Any help would be greatly appreciated.

    =SUMPRODUCT(($M$16:$M$838="Normal")*(PRODUCT({"06:00","18:00"}-E16)<0)*$N$16:$N$838)

    =SUMPRODUCT(($M$16:$M$838="Normal")*(PRODUCT({"18:01","0:00"}-E16)<0)*$N$16:$N$838)

    =SUMPRODUCT(($M$16:$M$838="Normal")*(PRODUCT({"0:01","5:59"}-E16)<0)*$N$16:$N$838)
    Last edited by curiousexcel; 08-26-2008 at 09:27 AM.

  4. #4
    Registered User
    Join Date
    08-26-2008
    Location
    NY
    Posts
    12
    any suggestions?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Macro for coding an action based on 3 columns of information
    By chozen86 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-31-2008, 10:44 PM
  2. need formula for C:1 to add column C rows that equal value in A:1 in column A
    By cosmicgrooves in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-18-2008, 07:35 PM
  3. How to change values in one column based upon values in another column
    By TomT in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-26-2008, 03:02 AM
  4. Delete Rows & Column Per Conditions....
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-11-2007, 09:02 PM
  5. summing different info from one column
    By redneck joe in forum Excel General
    Replies: 2
    Last Post: 10-12-2006, 05:53 PM

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