+ Reply to Thread
Results 1 to 5 of 5

Return SUM If one column is populated and another column equals one of two criteria

  1. #1
    Forum Contributor
    Join Date
    05-29-2009
    Location
    sheffield
    MS-Off Ver
    Excel 2013
    Posts
    210

    Return SUM If one column is populated and another column equals one of two criteria

    Afternoon all,

    I've been trying to figure this out with SUMIF(S) and SUMPRODUCT but i can't figure it out.

    On the attached, if B9 equals either "6th shift"(H3) or "6th shift (+10)"(X7) and O9 is greater than zero i.e. populated, then i want to return the figure in U9.

    Ive tried things like =sum(sumifs(U9,OR(B9,H3,B9,X7)+sumif(U9,O9>0)) but it doesn't work.

    Hopefully you can see what i'm getting at - please help!

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Return SUM If one column is populated and another column equals one of two criteria

    Hi

    Forgot the attached!
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Forum Contributor
    Join Date
    05-29-2009
    Location
    sheffield
    MS-Off Ver
    Excel 2013
    Posts
    210

    Re: Return SUM If one column is populated and another column equals one of two criteria

    attachment now attached
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor Melvinrobb's Avatar
    Join Date
    06-19-2012
    Location
    Manitoba, Canada
    MS-Off Ver
    Excel 2013
    Posts
    1,128

    Re: Return SUM If one column is populated and another column equals one of two criteria

    You aren't looking for the sum, you simply want one value returned. The formula can be quite simple then. This should do the trick:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by Melvinrobb; 09-06-2012 at 09:22 AM. Reason: Incorrect formula
    Please click the * icon below if I have helped.

  5. #5
    Forum Contributor
    Join Date
    05-29-2009
    Location
    sheffield
    MS-Off Ver
    Excel 2013
    Posts
    210

    Re: Return SUM If one column is populated and another column equals one of two criteria

    Thanks mate - altered slightly from yours - =IF(AND(OR(B9=$H$3,B9=$X$7),O9<>""),U9,"")

    You're right, i was trying to overcomplicate it.

    Thanks again.

+ 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