+ Reply to Thread
Results 1 to 10 of 10

SUMIF Using Multiple Criteria

Hybrid View

  1. #1
    Registered User
    Join Date
    01-29-2010
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    27

    SUMIF Using Multiple Criteria

    I have data in one column that I'd like to SUM however certain criteria needs to be met.

    I've used the following formula to date but am not getting any result.

    SUMPRODUCT(--(G2:G105),--(A2:A105=317),--(E2:E105=K9),--(E2:E105=K5),--(E2:E105=K7))

    K9 = Reseach
    K7 = Lunch
    K5 = Break

    Here is the data in question.

    Column G (Busy Time) contains the data I'd like to SUM. I'm looking to have the formula look at the busy code then add up the times of specific codes. For instance give me the SUM of times for Busy codes(column D) 3, 4 and 7 for Joe. The issue is that Joe isn't the only agent. Several are listed with their IDs showing in Column A. Each agent shows the same info but with their name and ID listed in Columns A and B. The number of codes listed can also change via agent. In Joe's case he has 8 codes listed but there are some agents that only 4, however all will have 3, 4 and 7.

    ID Name Total shift Busy code Busy reason Busy count Busy time

    317 Joe 3:50:01 0 No Code 29 0:36:42
    317 3:50:01 -1 System Code 3 0:00:09
    317 3:50:01 2 Meeting 1 0:38:04
    317 3:50:01 3 Break 17 3:51:36
    317 3:50:01 8 Callouts 1 0:02:17
    317 3:50:01 4 Lunch 12 4:54:43
    317 3:50:01 1 Training 18 8:21:39
    317 3:50:01 7 Research 45 2:32:45

    Anyway, as you can see, I'm in a pickle.

    Thanks!

    JT

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,037

    Re: SUMIF Using Multiple Criteria

    sorry, not that
    Never use Merged Cells in Excel

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: SUMIF Using Multiple Criteria

    I think you're asking for an OR based condition re: K5,K7 & K9 - as you have things presently your result will always be 0 given not all conditions can hold true simultaneously (ie E can not be K5,K7 & K9 at the same time)

    Generally speaking ORs are calculated via addition in Arrays / Sumproduct eg:

    =SUMPRODUCT(--(A2:A105=317),(E2:E105=K9)+(E2:E105=K5)+(E2:E105=K7),G2:G105)

    In truth though your layout is not clear and there may be better alternatives - if you post a sample file I'm sure people can help you further.

  4. #4
    Registered User
    Join Date
    01-29-2010
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: SUMIF Using Multiple Criteria

    Good point, would you prefer to see a copy of the actual Excel form? How do I post an attachment?

    Thanks!

    JT

  5. #5
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,037

    Re: SUMIF Using Multiple Criteria

    You can go to new post -> go advanced and press sticker (and just upload file)

    Possible inputs and desired outputs are preferable in dummy workbook.

  6. #6
    Registered User
    Join Date
    01-29-2010
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: SUMIF Using Multiple Criteria

    All righty, the sheet has been attached. Hope I did that correctly?

    JT
    Attached Files Attached Files

  7. #7
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,037

    Re: SUMIF Using Multiple Criteria

    how about Pivot table?
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    01-29-2010
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: SUMIF Using Multiple Criteria

    hmm, well not sure how it would work as I need to sum up only certain make busy code reasons, not all. Thoughts.

  9. #9
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,037

    Re: SUMIF Using Multiple Criteria

    You can add more criterias and you'll get SUMS on every instance..

    Just drag to row or column box.

  10. #10
    Registered User
    Join Date
    01-29-2010
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: SUMIF Using Multiple Criteria

    Aha! Actually you are correct, I can restrict it to certain criteria via a Pivot Table. Very cool.

+ 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